List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:July 13 1999 10:12pm
Subject:MYSQL error? (fwd)
View as plain text  
Claudia M. Castaneda writes:
 > ---------- Forwarded message ----------
 > Date: Tue, 13 Jul 1999 09:59:49 -0400
 > From: Gyorgy Fekete <gyuri@stripped>
 > To: bane@stripped, claudia@stripped
 > Subject: MYSQL error?
 > 
 > 
 > In case anyone cares...
 > 
 >   In mysql documentation (Node: mysql_fetch_field_direct)
 >   the example given:
 > 
 > 	MYSQL_FIELD *field;
 > 	field = mysql_fetch_field_direct(result, i);
 > 
 >   is wrong. It should be:
 > 
 > 	field = &mysql_fetch_field_direct(res, ui);
 >   --------------^----------------
 > The docs give the prototype 
 > MYSQL_FIELD *mysql_fetch_field_direct(MYSQL_RES *result, unsigned int fieldnr)
 > which *SEEMS* correct, but the mysql.h file revelas that this function is 
 > really a macro, therefore the type checking is weak. Discovery of this error
 > came from the compiler message:
 > 
 >     mt.c: In function `main':
 >     mt.c:53: incompatible types in assignment
 >     make: *** [mt.o] Error 1
 > 
 > for the line
 > 
 >     field = mysql_fetch_field_direct(res, ui); // res, ui are as approrpiate
 > 
 > I changed it to:
 > 
 >     field = &mysql_fetch_field_direct(res, ui); 
 > 
 > and everything was fine.
 > 
 > 
 > ---------------------------------------------------------------------
 > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
 > posting. To request this thread, e-mail mysql-thread7170@stripped
 > 
 > To unsubscribe, send a message to the address shown in the
 > List-Unsubscribe header of this message. If you cannot see it,
 > e-mail mysql-unsubscribe@stripped instead.
 > 
 > 


Thanks !

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped|
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
MYSQL error? (fwd)Claudia M. Castaneda13 Jul
  • MYSQL error? (fwd)sinisa14 Jul
  • MYSQL error? (fwd)Michael Widenius30 Jul