List:General Discussion« Previous MessageNext Message »
From:mel list_php Date:February 19 2005 1:36am
Subject:RE: MYSQL_RES & ......
View as plain text  
Hi,

I think you can find all the information you are looking for there:
http://dev.mysql.com/doc/mysql/en/c.html
You have a description of all the functions :
http://dev.mysql.com/doc/mysql/en/c-api-functions.html

For example:
http://dev.mysql.com/doc/mysql/en/mysql-fetch-row.html

MYSQL_ROW row;
unsigned int num_fields;
unsigned int i;
num_fields = mysql_num_fields(result);
while ((row = mysql_fetch_row(result)))
{
   unsigned long *lengths;
   lengths = mysql_fetch_lengths(result);
   for(i = 0; i < num_fields; i++)
   {
       printf("[%.*s] ", (int) lengths[i], row[i] ? row[i] : "NULL");
   }
   printf("\n");
}



Maybe this is a good start point for you!


>From: "Mohsen Pahlevanzadeh" <mohsen@stripped>
>Reply-To: mohsen@stripped
>To: mysql@stripped
>Subject: MYSQL_RES & ......
>Date: Fri, 18 Feb 2005 16:44:06 -0800 (PST)
>
>Dears,mysql_list_tables returns name of tables.(tables of a DB)
>It returns MYSQL_RES type.
>I want to split it to an array.
>I'm newbie in SQL,Please guide me.....
>I'm working C.
>yours,Mohsen
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:    
>http://lists.mysql.com/mysql?unsub=1
>

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/

Thread
MYSQL_RES & ......Mohsen Pahlevanzadeh19 Feb
  • RE: MYSQL_RES & ......mel list_php19 Feb
    • RE: MYSQL_RES & ......Mohsen Pahlevanzadeh19 Feb
      • Re: MYSQL_RES & ......Peter Brawley19 Feb
        • Re: MYSQL_RES & ......Mohsen Pahlevanzadeh20 Feb