Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I am trying to load/generate the link stored inside a cell from my sql table via php.
But I am getting an error:
Warning: simplexml_load_file() expects parameter 1 to be string, resource given in ... on line 78
Could you guys please tell me where I did wrong?
Here is my code:
$sql = "SELECT link FROM previousbroadcast WHERE id=21";
$result=mysql_query($sql);
$xml = simplexml_load_file($result);
$resultis not the value of the link field in your table, but the ressource id. You want something likeBe aware that this is very simple code, and you should make sure that the file exists before you try to load it…