[MySQL] - Extraction
#2

Hi ErF,

The best way I found to do this, is to fetch the returned row then explode it by it's seperator which is uually "|"


Let me give you an example:

Код:
new query[256], result[1024], row[10][64];
format(query,sizeof(query),"SELECT * FROM `tablename` WHERE `columnname` = '%s'",VARIABLE);
mysql_query(query);
mysql_store_result();
mysql_fetch_row_format(result);
explode(row,result,"|");
Variable1 = strval(row[1]);
mysql_free_result();
Thats the easiest way I found of doing it, BTW you can find the explode function here: http://forum.sa-mp.com/index.php?topic=110557.0

Hope this helped you out,

TJ
Reply


Messages In This Thread
[MySQL] - Extraction - by ErF - 24.02.2010, 11:59
Re: [MySQL] - Extraction - by TTJJ - 24.02.2010, 12:24
Re: [MySQL] - Extraction - by ErF - 24.02.2010, 13:21
Re: [MySQL] - Extraction - by Miguel - 24.02.2010, 14:20

Forum Jump:


Users browsing this thread: 2 Guest(s)