Search:

Type: Posts; User: hoho

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,751

    read() returns invalid file descriptor ???

    FILE *mysql;
    mysql = fopen("mysql.txt","rw");

    char buffer[1000];

    if (read(mysql,buffer,sizeof(buffer)) > 0) {
    printf ("%s\n",buffer);
    }
  2. Thread: MySQL C Api

    by hoho
    Replies
    5
    Views
    1,605

    Thanks for your replies, still no luck even if I...

    Thanks for your replies, still no luck even if I do escape all ' i.e.





    sprintf(query,"insert into history values(\'\',curdate(),curtime(),\'%d\',\'%d\',\'%s\',\'%d\'\)...
  3. Thread: MySQL C Api

    by hoho
    Replies
    5
    Views
    1,605

    MySQL C Api

    Hi! I have the following source code which seems to compile fine without any errors, however when I try to execute the binary, I get a core dump. The strace output doesn't lead me to think of any...
Results 1 to 3 of 3