I have a database with 2 tables.
One of the tables holds a row containing numbers, from 0 to 10.
In PHP, I do this:
$query = "SELECT ".$param." FROM issues WHERE ".$param." >=0";
$result = @mysql_query($query) or showError("query failed");
if (!($record = mysql_fetch_array($result))) return null;
return $record;
The $param holds the name of the row.
I kinda expected to get an array holding the number 0 to 10, but instead I get an array with 2 elements:
[0] = 0 [row_name] = 0
And that's it.
I've never worked with these functions before and www.php.net doesn't have any examples that really help...