Run time error!!!!!! Pls help...

Reply

Join Date: Feb 2008
Posts: 84
Reputation: jino is an unknown quantity at this point 
Solved Threads: 5
jino's Avatar
jino jino is offline Offline
Junior Poster in Training

Run time error!!!!!! Pls help...

 
0
  #1
Feb 8th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Run time error!!!!!! Pls help...

 
0
  #2
Feb 8th, 2008
code ?
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 569
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Run time error!!!!!! Pls help...

 
0
  #3
Feb 8th, 2008
Please post your code,We are not psychics here!hehe.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 84
Reputation: jino is an unknown quantity at this point 
Solved Threads: 5
jino's Avatar
jino jino is offline Offline
Junior Poster in Training

Re: Run time error!!!!!! Pls help...

 
0
  #4
Feb 8th, 2008
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;
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 569
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Run time error!!!!!! Pls help...

 
0
  #5
Feb 8th, 2008
Could you post your sql query please?I think that is where the error is coming...
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Run time error!!!!!! Pls help...

 
0
  #6
Feb 8th, 2008
$result_join is not a valid resource. Check $query_join by printing it out and executing it in phpmyadmin.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 84
Reputation: jino is an unknown quantity at this point 
Solved Threads: 5
jino's Avatar
jino jino is offline Offline
Junior Poster in Training

Re: Run time error!!!!!! Pls help...

 
0
  #7
Feb 8th, 2008
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['t1.personal_name'];
echo "name from page=".$name_n;
is not working!!!!! There is no error messages displaying.. but there is nothing printing other than the query
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Run time error!!!!!! Pls help...

 
0
  #8
Feb 8th, 2008
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,
  1. $query="select t1.name as name, t2.dept_no as dept from emp t1, dept t2 where t1.dept_id=t2.dept_id";
  2. $result=mysql_query($query);
  3. while($row=mysql_fetch_array($result)){
  4. $name=$row['name'];
  5. ...............
  6. }

That ll solve your problem.

Cheers,
Naveen
Last edited by nav33n; Feb 8th, 2008 at 2:29 am. Reason: Added more.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC