SA-MP Forums Archive
How to read the contents of a row in MySQL? - 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)
+--- Thread: How to read the contents of a row in MySQL? (/showthread.php?tid=615189)



How to read the contents of a row in MySQL? - EtayJ - 18.08.2016

Title says it all.


Re: How to read the contents of a row in MySQL? - Jabern - 18.08.2016

Euh you just loop the row and if you use the R39 plugins look at this :

https://sampwiki.blast.hk/wiki/MySQL/R33#cache_get_data


Re: How to read the contents of a row in MySQL? - EtayJ - 18.08.2016

Quote:
Originally Posted by Jabern
Посмотреть сообщение
Euh you just loop the row and if you use the R39 plugins look at this :

https://sampwiki.blast.hk/wiki/MySQL/R33#cache_get_data
But why do I need to loop? If I just send a query to look for the salt of a specific user, there would only be 1 row, but what function should I use in order to retrieve the content of the row and convert it into a string in PAWN


Re: How to read the contents of a row in MySQL? - iLearner - 18.08.2016

Depends on what plugin you're using, i use strickenkids, i can explain you for that...


Re: How to read the contents of a row in MySQL? - EtayJ - 18.08.2016

I am using Blue G's MySQL Plugin, https://sampforum.blast.hk/showthread.php?tid=56564


Re: How to read the contents of a row in MySQL? - Jabern - 18.08.2016

Quote:
Originally Posted by EtayJ
Посмотреть сообщение
But why do I need to loop? If I just send a query to look for the salt of a specific user, there would only be 1 row, but what function should I use in order to retrieve the content of the row and convert it into a string in PAWN
Ahhhh ... you should use :

PHP код:
cache_get_field_content(row"field_name[]"); 



Re: How to read the contents of a row in MySQL? - EtayJ - 18.08.2016

Quote:
Originally Posted by Jabern
Посмотреть сообщение
Ahhhh ... you should use :

PHP код:
cache_get_field_content(row"field_name[]"); 
Thanks But I get an undenfined symbol error.
PHP код:
Untitled.pwn(417) : error 017undefined symbol "cache_get_field_content" 



Re: How to read the contents of a row in MySQL? - Jabern - 18.08.2016

Quote:
Originally Posted by EtayJ
Посмотреть сообщение
Thanks But I get an undenfined symbol error.
Can you gave me the error ?


Re: How to read the contents of a row in MySQL? - Jabern - 18.08.2016

What version of Mysql you use ?


Re: How to read the contents of a row in MySQL? - EtayJ - 18.08.2016

MySQL plugin or MySQL?
That's the plugin version R6
plugin-R6-win32_vs9 (that's the name of the file)