Re: Simple C API question

2003-02-26 Thread Travis McLeskey
ero-terminated so you can use > it with ease and the regular C-character-functions. > > http://www.mysql.com/doc/en/mysql_fetch_row.html > > Regards > Bernhard > > - Original Message - > From: "Travis McLeskey" <[EMAIL PROTECTED]> > T

Re: Re: Simple C API question

2003-02-26 Thread Bernhard Döbler
cause the questioner gets the = > answers via private mail. > > Bernhard > > - Original Message -=20 > From: "Andrew" <[EMAIL PROTECTED]> > To: "Bernhard D=F6bler" <[EMAIL PROTECTED]> > Sent: Wednesday, February 26, 2003 10:21 AM > Su

Fw: Simple C API question

2003-02-26 Thread Bernhard Döbler
Why is the standard-receiver of a reply to the list, the original poster, not the list itself? - Original Message - From: "Bernhard Döbler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 9:58 AM Subject: Re: Simple C API question

Simple C API question

2003-02-25 Thread Travis McLeskey
Maybe this is a stupid question but I couldn't find suitable sample code or an answer in the manual. mysql_fetch_row() returns a MYSQL_ROW representation of a row of data. According to the manual, this is "an array of counted byte strings". mysql_fetch_field() returns a MYSQL_FIELD with members

Re: C API Question

2003-02-19 Thread Paul DuBois
At 11:13 -0600 2/19/03, Paul DuBois wrote: At 10:57 -0600 2/19/03, William R. Mattil wrote: Hello, I am having some cockpit trouble with the following MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char *wild); and it is like lack of understanding on my part. Syntax is: i

Re: C API Question

2003-02-19 Thread Paul DuBois
At 10:57 -0600 2/19/03, William R. Mattil wrote: Hello, I am having some cockpit trouble with the following MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char *wild); and it is like lack of understanding on my part. Syntax is: if (mysql_list_fields( &mysql, "some table na

C API Question

2003-02-19 Thread William R. Mattil
Hello, I am having some cockpit trouble with the following MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char *wild); and it is like lack of understanding on my part. Syntax is: if (mysql_list_fields( &mysql, "some table name", "some field name")) mysql_store_result and m

C API Question

2002-04-24 Thread Andrew Trese
In the MYSQL struct in the C API, how does one access the MYSQL_FIELD data? for example, and MYSQL struct has MYSQL_FIELD *fields; as a member variable. However, when I try to access any of the variables within fields for example, mysql.fields[0].name, I get a segmentation fault. Does anyone

RE: C API question

2002-03-27 Thread Chetan Lavti
hi, I think u don't need to convert it in to string... all the column values comes out in string only... I have used it... Chetan Lavti -Original Message- From: Federico Halperin [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 10:40 AM Subject: C API question In a tab

RE: C API question

2002-03-27 Thread Chetan Lavti
ECTED]] Sent: Thursday, March 28, 2002 10:40 AM Subject: C API question In a table, I declared a column which is an integer unsigned. After calling mysql_fetch_row, I need to convert the value of the column (i.e. row[0]) to a string. I tried to solve it doing this: char var[11]; sprintf (var, &quo

Re: C API question

2002-03-27 Thread Paul DuBois
At 5:09 + 3/28/02, Federico Halperin wrote: >In a table, I declared a column which is an integer unsigned. > >After calling mysql_fetch_row, I need to convert the value of the >column (i.e. row[0]) to a string. According to the manual, *all* column values are returned as strings. I'd say you

C API question

2002-03-27 Thread Federico Halperin
In a table, I declared a column which is an integer unsigned. After calling mysql_fetch_row, I need to convert the value of the column (i.e. row[0]) to a string. I tried to solve it doing this: char var[11]; sprintf (var, "%u", row[0]); , but it doesn't work. Is *row[0] an unsigned int? Can

Re: C API Question

2002-03-20 Thread Paul DuBois
At 11:35 + 3/20/02, Javier wrote: >Hi, > >I have a text file , with several MySQL instructions (CREATE TABLE, INSERT, >SET @var, etc.). > > I want to execute all these instructions from a C program , using the API. > >It is possible to use the function mysql_query(), to execute all the >instr

RE: C API Question

2002-03-20 Thread Kenneth Hylton
- From: Javier [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 5:35 AM To: [EMAIL PROTECTED] Subject: C API Question Hi, I have a text file , with several MySQL instructions (CREATE TABLE, INSERT, SET @var, etc.). I want to execute all these instructions from a C program , using th

C API Question

2002-03-20 Thread Javier
Hi, I have a text file , with several MySQL instructions (CREATE TABLE, INSERT, SET @var, etc.). I want to execute all these instructions from a C program , using the API. It is possible to use the function mysql_query(), to execute all the instructions contained in the file in a single call t

RE: Programming with C API question

2002-02-05 Thread Li, Robert
Hi, all MySQL team Thanks for your former help. Here is another question: As MySQL support multiple instances, each instance will run with different socket file and tcp/unix port number. I want to know when using MySQL client programs like mysqladmin to connect different instances, are both socke

Re: Programming with C API question

2001-10-31 Thread Sinisa Milivojevic
Li, Robert writes: > Hi, > I am a programmer. Now i want to know how to know > whether MySQL server is down or not through C API. > For me, i know if we use mysql_real_connect() to > connect MySQL server, when error returns we can not > distinguish it's due to authentation error or mysql server

Programming with C API question

2001-10-31 Thread Li, Robert
Hi, I am a programmer. Now i want to know how to know whether MySQL server is down or not through C API. For me, i know if we use mysql_real_connect() to connect MySQL server, when error returns we can not distinguish it's due to authentation error or mysql server down. Can we use mysql_error()

Re: Quick C API question

2001-02-27 Thread Robert Vetter
Evan James Dembskey wrote: > > Hi, > > I have this statement: > > res = mysql_query(&my_connection, "SELECT * FROM student WHERE studnum = > 31665222"); > for example something like this: char query[96]="SELECT * FROM student WHERE studnum="; int studnum; studnum=get_studnum(); s

Quick C API question

2001-02-27 Thread Evan James Dembskey
Hi, I have this statement: res = mysql_query(&my_connection, "SELECT * FROM student WHERE studnum = 31665222"); How do I change this so that I can use a variable instead of an explicitly coded studnum? Regards, Evan -

C API question

2001-01-23 Thread Evan James Dembskey
Hi, If this is not the appropriate list for this question, please accept my apolgies and kindly direct me to the correct list. I have attempted to install MySQL under CLOS 1.2 (Corel Linux), using the instructions found in Howard Schultens' "MySQL for dummies - part 1". I have worked through W.