how can I capture the query result in PHP?
I have two queries below:
[PHP]# Fetch the file information
$query ="update filestorage set approved ='Y' where FileID = {$id}";
$query1 ="select members.email from members, filestorage where filestorage.aut hor = members.usernam e and FileID = {$id}" ;[/PHP]
then execute the query using command below:
[PHP] $result = @mysql_query($q uery) or die("Error! Query failed: <pre>". mysql_error($db Link) ."</pre>");
$result1 = @mysql_query($q uery1) or die("Error! Query failed: <pre>". mysql_error($db Link) ."</pre>");[/PHP]
assigning var $result1:
[PHP] echo "$result1";
$to = "$result1";[/PHP]
and when I tried to print the $result1 it shows
where I'm expecting "email address" (johnsmith@yaho o.com) as a result :( Please anyone can show me how to do this in a right way.
I have two queries below:
[PHP]# Fetch the file information
$query ="update filestorage set approved ='Y' where FileID = {$id}";
$query1 ="select members.email from members, filestorage where filestorage.aut hor = members.usernam e and FileID = {$id}" ;[/PHP]
then execute the query using command below:
[PHP] $result = @mysql_query($q uery) or die("Error! Query failed: <pre>". mysql_error($db Link) ."</pre>");
$result1 = @mysql_query($q uery1) or die("Error! Query failed: <pre>". mysql_error($db Link) ."</pre>");[/PHP]
assigning var $result1:
[PHP] echo "$result1";
$to = "$result1";[/PHP]
and when I tried to print the $result1 it shows
"Resource id #3"
Comment