| | |
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 |
apache api array basic beginner binary body broken cache cakephp class cms code computing confirm cron curl customizableitems database date date/time delete display dynamic echo email error file filter folder form forms forum function functions gc_maxlifetime google headmethod howtowriteathesis href htaccess html iframe image include ip javascript joomla limit link list login malfunction memmory memory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php phpmysql query question random recourse recursion regex script search select seo server sessions snippet source space sql static system table thesishelp trouble tutorial update upload url variable video web webdesign xml youtube






