mysql "num_rows" problem...
#5

oh lol you're right (donya) didn't notice I forgot the value...
anyway lewwy your code returned the error that mysql_num_rows() was called when no querry was stored or so..
so finally I got to this:
pawn Код:
format(query, sizeof(query), "SELECT * FROM `Houses`");
mysql_query(query);
mysql_store_result();
format(query, sizeof(query), "INSERT INTO `Houses` (`id`, `Price`, `x`, `y`, `z`) VALUES (%d, %d, '%f', '%f', '%f')", (mysql_num_rows() + 1), price, x, y, z);
mysql_free_result();
mysql_query(query);
which works well
Reply


Messages In This Thread
mysql "num_rows" problem... - by Sascha - 26.03.2011, 19:08
Re: mysql "num_rows" problem... - by Lewwy - 26.03.2011, 19:17
Re: mysql "num_rows" problem... - by Donya - 26.03.2011, 19:37
Re: mysql "num_rows" problem... - by Lewwy - 26.03.2011, 19:39
Re: mysql "num_rows" problem... - by Sascha - 26.03.2011, 19:40
Re: mysql "num_rows" problem... - by Lewwy - 26.03.2011, 19:42
Re: mysql "num_rows" problem... - by Sascha - 26.03.2011, 19:43

Forum Jump:


Users browsing this thread: 1 Guest(s)