muratboy31 Posted July 24, 2013 Author Share Posted July 24, 2013 seri aynı olmasına rağmen uyarı mesajı vermiyor neyi eksik yapıyorum acaba ? a = Input.GetText("adi"); b = Input.GetText("soyadi"); c = Input.GetText("cihaz"); d = Input.GetText("marka"); e = Input.GetText("model"); f = Input.GetText("seri"); MysqlQuery = MySQLConnection:execute("SELECT * FROM demirbas where seri='"..f.."'"); goster = MySQLCursor:fetch({},"a"); if goster ~= nil then Dialog.Message("Uyarı", "Bu Seri No Daha Önceden Kayıt Edilmiş !", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else MysqlQuery = MySQLConnection:execute("INSERT INTO demirbas(adi, soyadi, cihaz, marka, model, seri) VALUES ('"..a.."','"..b.."','"..c.."','"..d.."','"..e.."','"..f.."')"); Dialog.Message("Eklenedi!", "Bilgiler Eklendi!", MB_OK, MB_ICONINFORMATION) Page.Jump("Page1"); end Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 24, 2013 Share Posted July 24, 2013 Böyle dener misin? a = Input.GetText("adi"); b = Input.GetText("soyadi"); c = Input.GetText("cihaz"); d = Input.GetText("marka"); e = Input.GetText("model"); f = Input.GetText("seri"); MysqlQuery = MySQLConnection:execute("SELECT * FROM demirbas where seri=".."'"..f.."'"); goster = MySQLCursor:fetch({},"a"); if goster ~= nil then Dialog.Message("Uyarı", "Bu Seri No Daha Önceden Kayıt Edilmiş !", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else MysqlQuery = MySQLConnection:execute("INSERT INTO demirbas(adi, soyadi, cihaz, marka, model, seri) VALUES ('"..a.."','"..b.."','"..c.."','"..d.."','"..e.."','"..f.."')"); Dialog.Message("Eklenedi!", "Bilgiler Eklendi!", MB_OK, MB_ICONINFORMATION) Page.Jump("Page1"); end Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 24, 2013 Author Share Posted July 24, 2013 Yine uyarı vermedi ! Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 24, 2013 Share Posted July 24, 2013 (edited) a = Input.GetText("adi"); b = Input.GetText("soyadi"); c = Input.GetText("cihaz"); d = Input.GetText("marka"); e = Input.GetText("model"); f = Input.GetText("seri"); MysqlQuery = MySQLConnection:execute("SELECT * FROM demirbas where seri=".."'"..f.."'"); goster = MySQLCursor:fetch(); if goster ~= nil then Dialog.Message("Uyarı", "Bu Seri No Daha Önceden Kayıt Edilmiş !", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else MysqlQuery = MySQLConnection:execute("INSERT INTO demirbas(adi, soyadi, cihaz, marka, model, seri) VALUES ('"..a.."','"..b.."','"..c.."','"..d.."','"..e.."','"..f.."')"); Dialog.Message("Eklenedi!", "Bilgiler Eklendi!", MB_OK, MB_ICONINFORMATION) Page.Jump("Page1"); end Böyle olması lazım. Edited July 24, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 24, 2013 Editor Share Posted July 24, 2013 reyiz bu nasıl bir kod yazma şeklidir hayranım sana :D where seri=".."'"..f.."'" Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 24, 2013 Author Share Posted July 24, 2013 Hayır olmadı, ayrıca kırmızı ile işaretlediğim yeri de düzelttim, ilginç ! a = Input.GetText("adi"); b = Input.GetText("soyadi"); c = Input.GetText("cihaz"); d = Input.GetText("marka"); e = Input.GetText("model"); f = Input.GetText("seri"); MysqlQuery = MySQLConnection:execute("SELECT * FROM demirbas where seri=".."'"..f.."'"); goster = MySQLCursor:fetch(); if goster ~= nil then Dialog.Message("Uyarı", "Bu Seri No Daha Önceden Kayıt Edilmiş !", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else MysqlQuery = MySQLConnection:execute("INSERT INTO demirbas(adi, soyadi, cihaz, marka, model, seri) VALUES ('"..a.."','"..b.."','"..c.."','"..d.."','"..e.."','"..f.."')"); Dialog.Message("Eklenedi!", "Bilgiler Eklendi!", MB_OK, MB_ICONINFORMATION) Page.Jump("Page1"); end Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 24, 2013 Share Posted July 24, 2013 @pairs niye hata mı var :D ? Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 bu konu ile ilgili bir fikri olan varmı acaba ? seri aynı olmasına rağmen uyarı mesajı vermiyor ? a = Input.GetText("adi"); b = Input.GetText("soyadi"); c = Input.GetText("cihaz"); d = Input.GetText("marka"); e = Input.GetText("model"); f = Input.GetText("seri"); MysqlQuery = MySQLConnection:execute("SELECT * FROM demirbas where seri='"..f.."'"); goster = MySQLCursor:fetch({},"a"); if goster ~= nil then Dialog.Message("Uyarı", "Bu Seri No Daha Önceden Kayıt Edilmiş !", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else MysqlQuery = MySQLConnection:execute("INSERT INTO demirbas(adi, soyadi, cihaz, marka, model, seri) VALUES ('"..a.."','"..b.."','"..c.."','"..d.."','"..e.."','"..f.."')"); Dialog.Message("Eklenedi!", "Bilgiler Eklendi!", MB_OK, MB_ICONINFORMATION) Page.Jump("Page1"); end Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 Yaptıgımda olmuştu kodlarımı değiştirdin. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 onu SQlite ile yapmıştın daha önce Mysql de olmuyor ! Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 Mysql deki demirbas tablona bak seri isimli kolon string tipindemi. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 serinin karşısını text yapıp denermisin.String ile Char farklı çünkü. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 Yine aynı ! Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 goster = MySQLCursor:fetch({},"a"); bu komutun altına Dialog.Message("",type(goster)); ekleyip bi denermisin tip olarak ne dönüyor Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 Team verebilirsen bakayım. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 365 618 384 8057 Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 MySQLCursor , err = MySQLConnection:execute("SELECT * FROM demirbas where seri='"..f.."'"); goster = MySQLCursor:fetch({},"a"); bu şekilde değiştirip denermisiniz.Hata buradaki kodda. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 25, 2013 Author Share Posted July 25, 2013 evet hata oradaymış, teşekürler... buarada 3-4 bağlanıp dosya çekmeye kalktığı için kapattım pc yi :) Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 25, 2013 Editor Share Posted July 25, 2013 valla bi gariplik vardı .Copy paste yapıyom oturum kapanıyor felan :D Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted July 26, 2013 Author Share Posted July 26, 2013 Masklı inptu veri tabanına nasıl kayıt edebilir ? Text olarak gitmiyor ! 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.