[solved]Converting my old Mysql code to new mysql code..
#1

Hi,

I have been copying my old script (from roughly year and half ago) to my new script. I am having trouble converting over some of my mysql code...

Here is my old code which uses mysql_fetch_row_format()

Code:
    while(mysql_fetch_row_format(result)) {
        sscanf(result, "p<|>ds[24]s[24]s[20]", iNCID, szOldName, szNewName, szTime);
        format(szLargeString, sizeof(szLargeString), "%s\n- (%d) Name: %s (changed from %s, %s)", szLargeString, iNCID, szNewName, szOldName, szTime);
    }
I cant figure out how to re-create this loop through each result with the new functions in the mysql plugin im using...


This is a link to the wiki for the OLD functions: https://sampwiki.blast.hk/wiki/MySQL#mysql_fetch_row_format

This is a link to the wiki for the NEW and CURRENT functions that i'm using: https://sampwiki.blast.hk/wiki/MySQL/R33#Cache_functions

Any ideas?
Reply
#2

Solved
Looked through wiki..

realised i need to use Mysql_num_rows in a for() loop....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)