Jump to content

Mysql Ile Login Olma Yardım


muratboy31
 Share

Recommended Posts

Arkadaşlar merhaba,

 

Mysql veri tabanında kullanıcılar için bir tablo oluşturdum şöyle bir problem var, sadece enson kayıt login olabiliyor, diğerlerinde oluşturduğum dialog hata mesajı veriyor... nerde yanlış var acaba ?

 

kullandığım kod bu ;

local tRes = MySQL.QueryToTable("SELECT * FROM yetki", true);
local nNumColumns = MySQL.GetFields();
local nNumRows = MySQL.GetRows();

for nRow = 1, nNumRows do
  for nColumn = 1, nNumColumns do  
    if nColumn == 1 then
    kullanici = tRes[nRow][nColumn]
    elseif nColumn == 2 then
    sifre = tRes[nRow][nColumn]
    end
end
end

	if kullanici == Input.GetText("Input1") and sifre == Crypto.MD5DigestFromString(Input.GetText("Input2")) then	
	Page.Jump("Page1");
	else
	Dialog.Message("Hata", "Lütfen giriş bilgilerini kontrol edin !", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
	end

EDIT : Belki başkasının işine yarar çözüm şu şekilde ;

local tRes = MySQL.QueryToTable("SELECT * FROM yetki WHERE user LIKE '%"..Input.GetText("Input1").."%'", true);
Edited by muratboy31
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...