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

Thread Solved
Reply

Join Date: Feb 2008
Posts: 77
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 18th, 2008
Dear All,,

My php page having a search query is not displaying the result when it is loaded...

But when i check this same query in php my admin it is working correctly...

for ex: If i search with the field "Marital Status" Single... There are totol 3 records having marital status "single", but the result will be getting only of 1...

The miracle is that when i test this same query in the php myadmin then i get the full 3 records.....

This means there is no prob in mysql_connection();
Please help me i am very confused!!!!!!!!!

Jino.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,681
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 319
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

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

 
0
  #2
Feb 18th, 2008
Code please.
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: 77
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
  #3
Feb 18th, 2008
This is the query

$query ="SELECT SQL_CALC_FOUND_ROWS * FROM reg_personal inner join reg_english_level inner join reg_services inner join reg_status ON(reg_personal.personal_code=reg_english_level.english_code AND reg_english_level.english_code=reg_services.services_code AND reg_services.services_code=reg_status.status_code)WHERE $query_string LIMIT 0, 30";

and it is working in php myadmin correctly and not working when the page is loaded!!!!!!

///echo statements are given below..

echo"
<tr>
<td width='503' height='19'><font face='Arial' style='font-size: 9pt'>
$row[personal_name];<b>($row[personal_code])</b>,$row[personal_present_address],Tel:&nbsp;$row[personal_phone], E-mail:
<a href='mailtoemail'><font color='#000000'>
$email</font></a>,<b>Joined&nbsp;$course_name1,$course_name2,$course_name3,&nbsp; at
$eng_date - Total Paid $total_paid/-. Balance $balance/- payment $payment_date.</b></font></td>
<td width='169' height='19'>
<font face='Arial' style='font-size: 10.5pt'><b>
<a href='registration-result-reports.php?id=$p_code'>Continue to Payment &gt;&gt;</a></b></font></td>
</tr>";


waiting for ur reply.!!!
Jino.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 158
Reputation: richie513 is an unknown quantity at this point 
Solved Threads: 11
richie513's Avatar
richie513 richie513 is offline Offline
Junior Poster

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

 
0
  #4
Feb 18th, 2008
Hi jino, you are not returning your query. try adding this line directly after your query.

$result = mysql_query($query) or die(mysql_error());

and see if this works
Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important.
richie513
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,681
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 319
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

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

 
0
  #5
Feb 18th, 2008
Where is the while loop ? Let me show you an example.
  1. $query="select * from table";
  2. $result=mysql_query($query);
  3. $row=mysql_fetch_array($result); //This will fetch only 1 record
  4. echo $row['name'];
  5. ...
  6. //to fetch all the records, loop through it.
  7. while($row=mysql_fetch_array($result)){
  8. echo $row['name'];
  9. ....
  10. }

Well, thats the way to fetch all the records.
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: 77
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
  #6
Feb 18th, 2008
Thank u nav....
As it was a very big coding.. i hardly noticed that

Thank u once more..
chears....
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,681
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 319
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

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

 
0
  #7
Feb 18th, 2008
You are welcome
Ignorance is definitely not bliss!

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

This thread has been marked solved.
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