MySQL - Anyone spare a minute?
#14

Quote:
Originally Posted by Calgon
View Post
mysql_get_field probably is expecting a string as the second parameter.

pawn Code:
new szUnload[10], IsMutedOrNot;

                    format(checkquery, sizeof(checkquery), "SELECT `muted` FROM `users` WHERE `username` = '%s'", OBanName);
                    mysql_query(checkquery);
                    mysql_store_result();
                    mysql_retrieve_row();
                    mysql_get_field("muted", szUnload); --- Error line ----
                    mysql_free_result();
                 
                                    IsMutedOrNot = strval(szUnload);
Also, as Vince said, you can use mysql_fetch_int which would be more relevant.
Thank you alot!

Thanks to everyone who replied too! .
Reply


Messages In This Thread
MySQL - Anyone spare a minute? - by GamingTurf - 29.11.2011, 18:36
Re: MySQL - Anyone spare a minute? - by GamingTurf - 29.11.2011, 18:48
Re: MySQL - Anyone spare a minute? - by BlackBank - 29.11.2011, 19:03
Re: MySQL - Anyone spare a minute? - by GamingTurf - 29.11.2011, 19:06
Re: MySQL - Anyone spare a minute? - by BlackBank - 29.11.2011, 19:07
Respuesta: MySQL - Anyone spare a minute? - by OPremium - 29.11.2011, 19:51
Re: MySQL - Anyone spare a minute? - by Calgon - 29.11.2011, 20:33
Re: MySQL - Anyone spare a minute? - by Scenario - 29.11.2011, 20:37
Re: MySQL - Anyone spare a minute? - by GamingTurf - 29.11.2011, 21:20
Re: MySQL - Anyone spare a minute? - by Scenario - 29.11.2011, 21:23
Re: MySQL - Anyone spare a minute? - by GamingTurf - 29.11.2011, 21:25
Re: MySQL - Anyone spare a minute? - by Calgon - 29.11.2011, 21:29
Re: MySQL - Anyone spare a minute? - by Vince - 29.11.2011, 21:29
Re: MySQL - Anyone spare a minute? - by GamingTurf - 29.11.2011, 21:35

Forum Jump:


Users browsing this thread: 1 Guest(s)