Guys a quick question,
I have two variables $Area and $value what I want to do is use these variables in a query on a mysql database roughly in the form below
SELECT * FROM db WHERE $Area = $value
and then use num-rows on the result
I have tried both of the ways below and I still keep getting warning messages
(i)$query = "SELECT * FROM db WHERE $area = $value";
(ii)$query = "SELECT * FROM db WHERE".$area."=".$value;
btw the warning messages relate to the result being an invalid argument for the num_rows function Any help in this is mucho appreciated.
THe Start of wisdom is to realise you know nothing. I must be a genius then!
I have two variables $Area and $value what I want to do is use these variables in a query on a mysql database roughly in the form below
SELECT * FROM db WHERE $Area = $value
and then use num-rows on the result
I have tried both of the ways below and I still keep getting warning messages
(i)$query = "SELECT * FROM db WHERE $area = $value";
(ii)$query = "SELECT * FROM db WHERE".$area."=".$value;
btw the warning messages relate to the result being an invalid argument for the num_rows function Any help in this is mucho appreciated.
THe Start of wisdom is to realise you know nothing. I must be a genius then!