Array and MySQL
#8

pawn Код:
new row[3][30];
Its an array in an array

I thought again about it, can you try that code maybe :S
I never worked directly with any mysql plugin, so I only guess things
Thats my last try for today
pawn Код:
stock GetJobData(row[][], field[])
{
    new result[MAX_QUERY];
    format(result, sizeof(result), "SELECT %s FROM %s", field, JOB_TABLE);
    MySQL_query(result), MySQL_result();
    for(new y; MySQL_fetch(row[y]); y++) {}
}
You use it like
pawn Код:
new row[3][30];
GetJobData(row, "spawn_x");
print(row[0]);
print(row[1]);
print(row[2]);
Reply


Messages In This Thread
Array and MySQL - by KingArthur - 05.07.2009, 18:40
Re: Array and MySQL - by Nero_3D - 05.07.2009, 18:58
Re: Array and MySQL - by KingArthur - 05.07.2009, 19:07
Re: Array and MySQL - by Nero_3D - 05.07.2009, 19:42
Re: Array and MySQL - by KingArthur - 05.07.2009, 19:48
Re: Array and MySQL - by Nero_3D - 05.07.2009, 20:10
Re: Array and MySQL - by KingArthur - 05.07.2009, 20:24
Re: Array and MySQL - by Nero_3D - 05.07.2009, 20:52
Re: Array and MySQL - by KingArthur - 05.07.2009, 21:12
Re: Array and MySQL - by Nero_3D - 06.07.2009, 12:20

Forum Jump:


Users browsing this thread: 3 Guest(s)