0

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\PHP5\www\registration-reports-result_testnet.php on line 137

3
Contributors
7
Replies
8
Views
9 Years
Discussion Span
Last Post by nav33n
0
echo "query_join=".$query_join;

 $result_join=mysql_query($query_join,$link);// or die(mysql_error());

137 //while($row_join=mysql_fetch_array($result_join))
while($row_join=mysql_fetch_array($result_join))
{
    $name_n=$row_join['t1.personal_name'];
    echo "name from page=".$name_n;

Edited by mike_2000_17: Fixed formatting

0

$result_join is not a valid resource. Check $query_join by printing it out and executing it in phpmyadmin.

0

Ok Nav it is now working correctly....
But the echo statements after the query

while($row_join=mysql_fetch_array($result_join))
{
$name_n=$row_join;
echo "name from page=".$name_n;
is not working!!!!! There is no error messages displaying.. but there is nothing printing other than the query

0

Whats t1.personal_name ? Is t1 a table name ? If yes, then I would suggest you to use an alias for that column. For example,

$query="select t1.name as name, t2.dept_no as dept from emp t1, dept t2 where t1.dept_id=t2.dept_id";
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
   $name=$row['name'];
   ...............
}

That ll solve your problem.

Cheers,
Naveen

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.