Weser Posted November 21, 2016 Share Posted November 21, 2016 (edited) Hello guys i have problem with sql check database does player exist or not if(mysql_num_rows(dbQuery(connect, "SELECT id FROM players where username='"..editBox.."'"))) then outputChatBox("Not work :(") end but this mysql_num_rows seems not working is there other type to check that or not? Edited November 21, 2016 by Weser Link to comment
LilDawage Posted November 21, 2016 Share Posted November 21, 2016 you have problem here you can try with method else Link to comment
Weser Posted November 21, 2016 Author Share Posted November 21, 2016 2 hours ago, NightStar said: you have problem here you can try with method else what do you mean ? Link to comment
pa3ck Posted November 22, 2016 Share Posted November 22, 2016 dbQuery( function(qh) local result = dbPoll( qh, 0 ) if(result and #result > 0) then outputChatBox("Found") else outputChatBox("Not found") end end,connection, "SELECT id FROM players where username= ? LIMIT 1", username ) 1 Link to comment
LilDawage Posted November 22, 2016 Share Posted November 22, 2016 1 hour ago, pa3ck said: dbQuery( function(qh) local result = dbPoll( qh, 0 ) if(result and #result > 0) then outputChatBox("Found") else outputChatBox("Not found") end end,connection, "SELECT id FROM players where username= ? LIMIT 1", username ) right u can use this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now