SQL syntax
Code:
dbi_query(dbc, "INSERT INTO table (blah) VALUES (variable)")Code:
dbi_query(dbc, "INSERT INTO table (blah) VALUES (variable)") |
Re: SQL syntax
Format a string.
Code:
|
Re: SQL syntax
SixTwin that's not the answer and you don't have to use format.
PHP Code:
PHP Code:
|
Re: SQL syntax
Thank you very much :)
All ok, but when I compiled, there showed some warning: PHP Code:
PHP Code:
|
Re: SQL syntax
Quote:
warning telling you that you have messy code usually. One thing I'd like to point out is that if you want to protect your server from SQL injection then use full quotions: Code:
dbi_query(dbc, "INSERT INTO `table` ( `blah` ) VALUES ( ^"variable^" );"); |
Re: SQL syntax
Please help me with SELECT. :oops:
I have read tutorial, but i didn't understand... Can someone write some example ? The query: Code:
dbi_query(dbc, "SELECT map FROM maps LIMIT 10")Thanks. |
Re: SQL syntax
Quote:
Code:
new Handle:mapQuery = SQL_PrepareQuery(g_Database, "SELECT `map` FROM `maps` LIMIT 10;");I haven't used DBI in awhile so I can't remember off the top of my head. |
Re: SQL syntax
Is there some simpler examle ? I have to learn basic and later i need to learn advanced scripting :]
I need just the query and print :) Thank you anyway :) |
| All times are GMT -4. The time now is 21:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.