|
Mysql C API problems: msg#01138db.mysql.general
hi there the present serves for some clearing some doubts i have: 1 - if i wanna make an action based on the fact that a query i just made won't return results (empty set), how can i test that? will this do? if(!mysql_query(myData, query) { results = mysql_store_results(myData); if(mysql_num_rows() == 0) { //action; } } 2 - if the the row is made of one single field wich in turn is an integer, how can i address to it's value? will this do? row = mysql_fetch_row( results ); if(row[0]!=NULL) { tempo=_registo[0]->decimals; //?!??!?!? //other actions here }//if thank u in advance, Compliments --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <mysql-thread113387@xxxxxxxxxxxxxxx> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@xxxxxxxxxxxxxxx> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Problem with a query: 01138, Mikhail Entaltsev |
|---|---|
| Next by Date: | Hidden rows in table.: 01138, Jonas Olofsson |
| Previous by Thread: | Fw: Mysql/mod_perl/DBI Problem in retireving rowsi: 01138, Subhrajyoti |
| Next by Thread: | RE: Mysql C API problems: 01138, Dean Harding |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |