char buffer[500]; sprintf(buffer, "SELECT COUNT(*) FROM tblURLIP WHERE IP = %s And IPStatus = '1' AndIPMax = '0'"), ipSrc, mysql_query(conn, buffer);
char buffer[500]; /* use sprintf - (s)tring(print)(f)ormatted */ /* wrap the %s for ipsrc in quotes */ sprintf(buffer, "SELECT COUNT(*) FROM tblURLIP WHERE IP = '%s' And IPStatus = '1' AndIPMax = '0'", ipSrc); /* use the generated command */ mysql_query(conn, buffer);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)