I am using mysql_query to insert into a column which is of type
datetime. My variable is stored in a char string. I need to put it into
the query in a way that it can be inserted:
myDate = "98-12-12".this is what I have.
sprintf (myquery, '%what here? ', myDate); ..
I have the call to mysql_server_init() cided exactly as it appears in
the mysql manual sample. It returns 0 (success), yet the server is never
sarted . I check that its not running by trying to type in the mysql
command line (I had started the server normally before, started mysql,
shutdown the ser
Non zero indicates an error but the possible values are (from errmsg.h)
Return Values
Zero if the query was successful. Non-zero if an error occurred.
Errors
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order.
CR_SERVER_GONE_ERROR
The MySQL server has gone away.
CR_SERVER_LO
When I created a database (directly in mysql) from some random dir where
I started mysql, I found that it got created in the /var/lib/mysql dir.
I ran mysql from a dir where my C++ program is. I wanted to create a
database using mysql_query so I did mysql_query( &mysql, "CREATE
DATABASE IF NOT E
I am going to use mysql_query() and want to find out if a certain
database exists. If mysql_real_connect() fails there are many errors
that could account for this. The database may exist , and I cant take
the error returned from the failed query to mean the db isnt there and
should be created. S
I'm on Linux and had to install the myself server since that didn't work
from the Linux install cd. When I run mysql_install_db I get "host name
lookup failure" . Please configure the hostname.
However in my Linux hosts table I DO have the localhost address. and if
I do resolveip localhost from
and looking
forward for your assiatance.
regards
Aa