Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualLandi20

Posted 10 March 2013 - 08:18 AM

put the query like this and problem solve

char ola[512];
    mysql_real_connect (conn, opt_host_name, opt_user_name, opt_password,
    opt_db_name, opt_port_num, opt_socket_name, opt_flags);
snprintf(ola,sizeof ola,"SELECT password From User where username=('%s');",user);
if(mysql_query(conn,ola)){
        fprintf(stderr, "%s \n", mysql_error(conn));
    printf("ERRO %s",mysql_error(conn));
        printf("Press any key to continue. . . \n");
//        getch();
        exit(1);
    }    
res=mysql_use_result(conn);

#1Landi20

Posted 10 March 2013 - 08:17 AM

put the query like this and problem solve

snprintf(ola,sizeof ola,"SELECT password From User where username=('%s');",user);
if(mysql_query(conn,ola)){
        fprintf(stderr, "%s \n", mysql_error(conn));
	printf("ERRO %s",mysql_error(conn));
        printf("Press any key to continue. . . \n");
//        getch();
        exit(1);
    }    
res=mysql_use_result(conn);

PARTNERS