I am a senior in Polytechnic University working on my
senior project.  I have chosen MySQL to be database in
Red Hat linux 7.0.  I writing a program to insert a
value into the database in c language.  The data
changes so i have to insert the data as a variable,
but the database reports a error saying that the data
is a column, the code is something like this..

int main(int argc, char **argv)
{
..
char* test;
test="abcd";
int res;
MySQL *connection;

res=mysql_query(connection, "INSERT INTO tablename
(userid) VALUES(test));

}

I get an error saying "Insert error 1054, unknown
column 'test' in 'field-list'

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
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

Reply via email to