Jump to content

check database


Best-Killer

Recommended Posts

Posted

i'm making bans system with sql ,

i want check if the serial is banned from database how to do it 

function isSerialBanned(s)
    serial = exports.NGSQL:db_exec("SELECT * FROM bans WHERE srl=?", s)
	return 
end

f

Posted
3 minutes ago, Best-Killer said:

any help pls ?

I suppose this would be enough:

function isSerialBanned(s)
    serial = exports.NGSQL:db_exec("SELECT * FROM bans WHERE srl=?", s)
	if serial then 
		return true 
  	end
	return false
end

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...