Jump to content

Veri Tabanından Silme İşlemi Nasıl Yapılır?


muratboy31
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 by reyiz
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Editor

goster = MySQLCursor:fetch({},"a");

 

bu komutun altına

 

Dialog.Message("",type(goster));  ekleyip bi denermisin tip olarak ne dönüyor

Link to comment
Share on other sites

  • Editor

MySQLCursor , err = MySQLConnection:execute("SELECT * FROM demirbas where seri='"..f.."'");
goster = MySQLCursor:fetch({},"a");

 

 

bu şekilde değiştirip denermisiniz.Hata buradaki kodda.

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...