heavenprince
Programmer
Can we append/concat query string someway, because the followng code is giving a warning rather than executing the query including the concatenated part:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in test.php on line 5
Code:
<?php
require_once ('conn_db.php');
$query = "select * from pm where city_id = 7";
$query = $query . "and type = 4";
$num = mysql_num_rows (mysql_query ($query)); // line 5
echo $num;
?>
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in test.php on line 5