How to get results from mysql query? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to get results from mysql query? (
/showthread.php?tid=138276)
How to get results from mysql query? -
mysql - 01.04.2010
In PHP to get mysql results and for every row to do a command is something like this:
Код:
mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); //login
mysql_select_db("test") or die(mysql_error()); //Select db
$result = mysql_query("SELECT * FROM example"); //send a query
while($row = mysql_fetch_array( $result )) { //for every row to do a command
//commands
}
BUT how can I do this in pawno

