I try to fetch some query from my mysql db and have trouble.
The connection is succssfully work to the DB.
Than when i try to run this code in phpmyadmin so the results are correct.
This is query i try to fetch:
[php]SELECT cat.name as category, scat.name as subcategory
FROM cat INNER JOIN scat
WHERE cat.id = scat.target[/php]
And this is the problem come after:
[php]Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/php]
The error comes from the line where i fetch the varieble
This is all the code:
[php]$result = mysql_query(“SELECT cat.name as category, scat.name as subcategory
FROM cat INNER JOIN scat
WHERE cat.id = scat.target”);
$myrow = mysql_fetch_array($result);[/php]