SA-MP Forums Archive
Another MySQL question - 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: Another MySQL question (/showthread.php?tid=247988)



Another MySQL question - Exxious - 11.04.2011

Is there anyway to get the number of how many columns there are in the table?


Re: Another MySQL question - Alby Fire - 11.04.2011

If you mean how many records stored in the table, use
pawn Код:
mysql_query("SELECT COUNT(table_name) FROM `random_field_name`");
mysql_store_result();
This function will return the value through mysql_fetch_int();
Or.. if you mean how many fields are there in a table, I guess ain't possible.


Re: Another MySQL question - Exxious - 11.04.2011

That's the thing I needed, thanks.