if field exist sqllite
#4

Quote:
Originally Posted by ratxrat
Посмотреть сообщение
im just create 1 table and 1 field , and not dynamic .

can im use like this
PHP код:
new DBResult:result db_query(info"SELECT `email` FROM `player`;");
if (
result == "test@ya.com")
{
    
// field exist
}
db_free_result(result); 
That's not called checking for a field existence, i think you are checking for the email value for a specific user?
You can use the same query but with a little condition in it or maybe not (depends):
pawn Код:
db_query(db, "SELECT `email` FROM `player` WHERE `user` = 'test'");
So you can see i added a condition WHERE `user` = 'test' which actually filters that data.

For more, ****** for SQL(ite) learning to learn more deeply and clearly.
Reply


Messages In This Thread
if field exist sqllite - by ratxrat - 22.05.2016, 04:46
Re: if field exist sqllite - by Gammix - 22.05.2016, 06:11
Re: if field exist sqllite - by ratxrat - 22.05.2016, 07:14
Re: if field exist sqllite - by Gammix - 22.05.2016, 17:09

Forum Jump:


Users browsing this thread: 2 Guest(s)