| | |
Run time error!!!!!! Pls help...
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
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.
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.
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: $row[personal_phone], E-mail:
<a href='mailto
email'><font color='#000000'>
$email</font></a>,<b>Joined $course_name1,$course_name2,$course_name3, 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 >></a></b></font></td>
</tr>";
waiting for ur reply.!!!
Jino.
$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: $row[personal_phone], E-mail:
<a href='mailto
email'><font color='#000000'>$email</font></a>,<b>Joined $course_name1,$course_name2,$course_name3, 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 >></a></b></font></td>
</tr>";
waiting for ur reply.!!!
Jino.
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
$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
Where is the while loop ? Let me show you an example.
Well, thats the way to fetch all the records.
php Syntax (Toggle Plain Text)
$query="select * from table"; $result=mysql_query($query); $row=mysql_fetch_array($result); //This will fetch only 1 record echo $row['name']; ... //to fetch all the records, loop through it. while($row=mysql_fetch_array($result)){ echo $row['name']; .... }
Well, thats the way to fetch all the records.
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
Similar Threads
- Run time error!!!!!! Pls help... (PHP)
- what does it mean A Runtime Error? (Windows NT / 2000 / XP)
- windows xp installation error!! pls help! (Troubleshooting Dead Machines)
Other Threads in the PHP Forum
- Previous Thread: help
- Next Thread: Vbulletin login box on a non vbulletin page
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube






