Hi, It's ok but you must retrieve data from "row". int sql_result;x,i; MYSQL_RES *MResult; MYSQL_ROW *row; MYSQL *MQuery; char SQLQuery[];
sprintf( SQLQuery, "SELECT * FROM Profile" ); sql_result = mysql_query(SQLQuery); MResult = mysql_store_result(MQuery); //mysql_store_result return in MResult not in MQuery (here was :...mysql_store_result(&MQuery)) mysql_data_seek(MResult, 1); //it's ok here...i suppose you whish to retrieve data from 2-nd "row".... row = mysql_fetch_row( MResult) ; // if you have a valid connection(or query) mysql_fetch_row should return non NULL value. i = mysql_num_fields(MResult) ; for ( x = 0 ; x < i ; x++ ) { printf("Data from MYSQL_ROW : %s \n",row[x]); } mysql_free_result( res ) ; I hope it's help. Regards, Gelu _____________________________________________________ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] ----- Original Message ----- From: "Chan WieVia ICM N MC MI E3 Extern" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 09, 2002 9:29 PM Subject: C API: mysql_data_seek > > Hi, > > I'm using the MySQL built-in C function, mysql_data_seek, for accessing a > particular row from the Result (MYSQL_RES) returned by mysql_store_result. > > int sql_result; > MYSQL_RES *MResult; > MYSQL_ROW row; > MYSQL MQuery; > char SQLQuery[]; > > sprintf( SQLQuery, "SELECT * FROM Profile" ); > sql_result = mysql_query(SQLQuery); > MResult = mysql_store_result(&MQuery); > mysql_data_seek(MResult, 1); > row = mysql_fetch_row(MResult); > > However, "row" returns NULL. I wonder if I've made any mistake in the > process. Can someone please help to check? In addition, is there any > special considerations when using this function? > > Thanks in advance. > > wv > > > > > --------------------------------------------------------------------- > 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 <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- 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 <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php