Jump to content

Recommended Posts

Merhaba Arkadaşlar ; 
 
Öncelikle şunu belirteyim forumda araştırma yaptım. Şu linki buldum. http://www.tnctr.com/topic/193590-ams-ile-mysql-veritabanyna-badhlanma

 

Sonra Denedim şu hatayı verdi. 

[url=http://www.tnctr.com/uploads/imgs/pre_1383476993__ams.png]pre_1383476993__ams.png[/URL]

 

Php biliyorum- ayarları ona göre yaptım- SQL de biliyorum yani cümleciklerde, sorguda felan

hata yok global funcitonsda hata var heralde onun resmi ise ;
 

[url=http://www.tnctr.com/uploads/imgs/pre_1383477069__hata.png]pre_1383477069__hata.png[/URL]

 

Lütfen Yardımıcı olun arkadaşlar.

KintaRo ve pairs üstadlar sizdende yardım bekliyorum.

iyi forumlar

Link to comment
Share on other sites

aşağıdaki örnekte localde çalışan sunucuma bağlanıp ariston db sindeki kategoriler tablosundan veri çekmeyi gösterdim. kendine göre düzenlersin.

 

Global Functions:

function baglan()
MySQLConnection, err = MySQL:connect("ariston", "root", "localhost", "")
end

function kapat()
MySQLConnection:close()
end

Page On Show

baglan()
db, err = MySQLConnection:execute("SELECT * FROM kategoriler")
tVeri = db:fetch({}, "a")
while tVeri do
ListBox.AddItem("ListBox1", tVeri.kategori)
tVeri = db:fetch({}, "a")
end
kapat();
Link to comment
Share on other sites

Teşekkür Ederim Bağlantı Sağladım. Bu Seferde Verileri Çekerken Karakter Sorunu Yaşıyorum.

 

VE INSERT INTO komutu kullanırken yani veri eklerken Yazı karakteri Değişiyo türkçe olmuyo..

 

Yabancı karakter oluyo. Bunun için SQL cümleciği kullanıyorum yine olmuyo acaba karakter seti ile ilgili Bir Çözüm Varmıdır.

 

Teşekkür ederim.

Link to comment
Share on other sites

  • 2 years yıl...

 

aşağıdaki örnekte localde çalışan sunucuma bağlanıp ariston db sindeki kategoriler tablosundan veri çekmeyi gösterdim. kendine göre düzenlersin.

 

Global Functions:

function baglan()
MySQLConnection, err = MySQL:connect("ariston", "root", "localhost", "")
end

function kapat()
MySQLConnection:close()
end

Page On Show

baglan()
db, err = MySQLConnection:execute("SELECT * FROM kategoriler")
tVeri = db:fetch({}, "a")
while tVeri do
ListBox.AddItem("ListBox1", tVeri.kategori)
tVeri = db:fetch({}, "a")
end
kapat();

Mysql deki veritabanım içindeki Logs tablomu okumaya çalışıyorum

 

global:

function baglan()
MySQLConnection, err = MySQL:connect("veritabanı adı", "kullanıcı adı", "şifre", "ip")
end

button: 

baglan()
db, err = MySQLConnection:execute("SELECT * FROM Logs")
tVeri = db:fetch({}, "a")
while tVeri do
ListBox.AddItem("ListBox1", tVeri)
tVeri = db:fetch({}, "a")
end

db deki "a" nın neyi işaret ettiğini anlamadım.

Aldığım hata : http://img.prntscr.com/img?url=http://i.imgur.com/6MUHJjW.png

Logs tablosu : http://img.prntscr.com/img?url=http://i.imgur.com/re20GMe.png

Link to comment
Share on other sites

a = alphabetical

n = numerical

tVeri = db:fetch({}, "a")

dersen sütunlar ismiyle tVeri değişkenine depolanır.

 

tVeri.sutun1, tVeri.sutun2 gibi.

tVeri = db:fetch({}, "n") 

dersen sutun indexi ile depolanır

 

tVeri[0] , tVeri[1] gibi..

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...