Yusuf-Yildiz Posted January 4, 2012 Share Posted January 4, 2012 [b]S.a. arkadaşlar,[/b] [b] [/b] [b]OnStartup'a;[/b][code]MySQLConnection, err = MySQL:connect("www.siteismi.net", "kullanıcıadı", "şifre", "https://m5085.canohosting.com",port); if not MySQLConnectionn and err then Dialog.Message("Hata", "Veritabanı ile bağlantı kurulamadı!", MB_OK, MB_ICONSTOP);end[/code] [b]Page OnShow'a;[/b] [code] MySQLCursor, id = MySQLConnection:execute("SELECT haber_id FROM haber"); MySQLCursor, baslik = MySQLConnection:execute("SELECT haber_baslik FROM haber"); MySQLCursor, kategori = MySQLConnection:execute("SELECT haber_kategori FROM haber"); MySQLCursor, detay = MySQLConnection:execute("SELECT haber_detay FROM haber"); MySQLCursor, resim = MySQLConnection:execute("SELECT haber_resim FROM haber"); MySQLCursor, tarih = MySQLConnection:execute("SELECT haber_tarih FROM haber"); Label.SetText("baslik", baslik); Label.SetText("kategori", kategori); Paragraph.SetText("detay", detay); Image.Load("resim", "http://www.siteismi.net/foto/"..id); Paragraph.SetText("tarih", tarih);[/code] [b]yazdım. Fakat veritabanına bağlanılamadı dialoğunu gösteriyor. Acaba yerlerini mi karıştırdım? Doğrusu nedir?[/b] Quote Link to comment Share on other sites More sharing options...
galetis Posted January 4, 2012 Share Posted January 4, 2012 Çok değişik yapmışsın ya. MySQLConnection, err = MySQL:connect("www.siteismi.net", "kullanıcıadı", "şifre", "veritabanı"); şeklinde olması gerekiyor. Executelerde öyle çalışmaz. Tablo olarak çekiyorsun sonuçta. Quote Link to comment Share on other sites More sharing options...
NotToday Posted January 4, 2012 Share Posted January 4, 2012 @severalnasty sana hızlandırılmış dayak dersi lazım bu ne böyle Quote Link to comment Share on other sites More sharing options...
Yusuf-Yildiz Posted January 4, 2012 Author Share Posted January 4, 2012 [quote name='ReaLyMaN' date='05 January 2012 - 00:20 ' timestamp='1325715629' post='1135823'] @severalnasty sana hızlandırılmış dayak dersi lazım bu ne böyle [/quote] [b]İlk defa mysql'den veri çekiyorum hocam, hiçbir yerde bulamadım, sql var mysql yok [img]http://www.tnctr.com/public/style_emoticons/default/dry.gif[/img][/b] Quote Link to comment Share on other sites More sharing options...
g.a Posted January 4, 2012 Share Posted January 4, 2012 [b]@severalnasty[/b]kaç kere shoutda sordun Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.