SA-MP Forums Archive
MySQL Update Problem - 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: MySQL Update Problem (/showthread.php?tid=653704)



MySQL Update Problem - BrainDamaged - 10.05.2018

Hi forum sa-mp, how do I update the following codes for r41 ?

Before:
Код:
format(string, sizeof(string), "%s%d\t%s\t%s\t%s\n", string, cache_get_field_content_int(i, "ID"), name, PermissionStates[ cache_get_field_content_int(i, "Can_Deposit") ], PermissionStates[ cache_get_field_content_int(i, "Can_Take") ]);
After:

Код:
format(string, sizeof(string), "%s%d\t%s\t%s\t%s\n", string, cache_get_value_name_int(i, "ID"), name, PermissionStates[ cache_get_value_name_int(i, "Can_Deposit") ], PermissionStates[ cache_get_value_name_int(i, "Can_Take") ]);
,

Error

Код:
error 017: undefined symbol "cache_get_field_content_int"



Re: MySQL Update Problem - BrainDamaged - 10.05.2018

Up++ (Help expected)


Re: MySQL Update Problem - Dayrion - 10.05.2018

https://sampwiki.blast.hk/wiki/MySQL/R40...et_value_index I guess


Re: MySQL Update Problem - BrainDamaged - 10.05.2018

I have studied the subject but could not get a fruitful result, can you help me through the sample

Not: My bad english, sorry


Re: MySQL Update Problem - FaLLenGirL - 10.05.2018

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
@Dayrion wanted to say from his post that you must update your MySQL plugin.
That's why he gave to you the download link of the R40 MySQL Version, that version
contains some functions that have been renamed. I see that you already know that. Here's an example:

PHP код:
// you must use the function before,
// it is the same for cache_get_field_content_int
new pName30 ], string500 ];
for( new 
0Rows++ )
{
    
cache_get_value_namei"Name"pName30 ); 
    
formatstringsizeof( string ), "%s - Name"pName );




Re: MySQL Update Problem - BrainDamaged - 10.05.2018

Quote:
Originally Posted by FaLLenGirL
Посмотреть сообщение
@Dayrion wanted to say from his post that you must update your MySQL plugin.
That's why he gave to you the download link of the R40 MySQL Version, that version
contains some functions that have been renamed. I see that you already know that. Here's an example:

PHP код:
// you must use the function before,
// it is the same for cache_get_field_content_int
new pName30 ], string500 ];
for( new 
0Rows++ )
{
    
cache_get_value_namei"Name"pName30 ); 
    
formatstringsizeof( string ), "%s - Name"pName );

I thank you for your help, I am a bit confused about how to change the codes I have given. Could you apply the example above to the codes I threw?


Re: MySQL Update Problem - FaLLenGirL - 10.05.2018

Do you understand now how ?

PHP код:
new pIDpDeppTake;
cache_get_value_inti"ID"pID );
cache_get_value_inti"Can_Deposit"pDep );
cache_get_value_inti"Can_Take"pTake );

formatstringsizeof( string ), "%s%d\t%s\t%s\t%s\n"stringpIDnamePermissionStatespDep ], PermissionStatespTake ] ); 
* Important here it says (be more careful with the informations):



Re: MySQL Update Problem - BrainDamaged - 10.05.2018

Thank you so much ! (Problem Fixed)