Re: How to pass values (host variables) to SQL
Thanks, found the answer:
sprintf(stmt, "select * from users where userid = %d", id);
fprintf(stderr, stmt);
/* if (0 != mysql_query(conn, "select * from users where userid = $name")) */
if (0 != mysql_query(conn, stmt) )
{
fprintf(stderr,"Error query: %s \n", mysql_error(conn));
exit (1);
}
Subject
Views
Written By
Posted
4622
February 02, 2010 12:42PM
Re: How to pass values (host variables) to SQL
1822
February 02, 2010 12:59PM
1989
March 17, 2010 04:44AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.