TravelMan - 8:53 pm on Nov 23, 2004 (gmt 0) Would anyone know why? It doesn't use reserved words either. Heres the table structure, just in case this is the prob. Thanks for any pointers.
For those who might not be aware, the following takes the $_POST vars from a submitted form and does a db lookup based upon the chosen user variables.
$advquery = "SELECT SUM(pc_count) as amount FROM $tablename WHERE pc_place IN('" . implode("','", $_POST['chosenoption']) . "')";
$adv = mysql_fetch_array($advcresult);
echo" $adv[amount] ";
The above returned a result when I echoed $advquery to the browser, and ran the contents through phpmyadmin's sql interpreter. However, the same query when run through the script itself ( as above), outputs nothing to the browser, yet I know for certain it should ( based upon the chosen data at least).
CREATE TABLE placecount (
pc_count varchar(20) NOT NULL default '',
pc_place varchar(60) NOT NULL default '',
PRIMARY KEY (pc_place),
KEY pc_place (pc_place)
Would anyone know why?
It doesn't use reserved words either.
Heres the table structure, just in case this is the prob.
Thanks for any pointers.