• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

php & mysql problem..

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

asusradeon

Member
Joined
Oct 25, 2004
Location
127.0.0.1
hi guys,
not posted for a few weeks but anyway, ive got a problem with part of a system im developing at work.

heres the code:

PHP:
<?php
$db = mysql_connect("localhost", "Administrator", "pass"); //Server connection
mysql_select_db("learn_php",$db); //Select database on mysql server
$result = mysql_query("SELECT * FROM multi_data",$db); //send mysql query
$num_rows = mysql_num_rows($result); //retreive number of lines

for($i = 0;$i != $num_rows; $i += 1)
{
$query = mysql_query("SELECT `job_ref` FROM `frontscreen` WHERE `ID` = $i+1",$db);
echo "<tr>
      <td
 style=\"text-align: center; font-family: Helvetica,Arial,sans-serif;\"
 valign=\"undefined\">"mysql_fetch_assoc($query)"</td>
      <td
 style=\"text-align: center; font-family: Helvetica,Arial,sans-serif;\"
 valign=\"undefined\"></td>
      <td
 style=\"text-align: center; font-family: Helvetica,Arial,sans-serif;\"
 valign=\"undefined\">23:41</td>
      <td
 style=\"text-align: center; font-family: Helvetica,Arial,sans-serif;\"
 valign=\"undefined\">1:15</td>
      <td
 style=\"text-align: center; font-family: Helvetica,Arial,sans-serif;\"
 valign=\"undefined\">3:15</td>
      <td
 style=\"text-align: center; font-family: Helvetica,Arial,sans-serif;\"
 valign=\"undefined\">18:00 25/09/2007</td>
    </tr>
";
}

?>
Im trying to retreive the data in the job_ref field for each ID row into the appropriate part of the html table, this is just the php section no the entire code for the page.

here is the error i get:

Code:
[B]Parse error[/B]:  syntax error, unexpected T_ECHO in [B]/var/www/sla/frontend.php[/B] on line [B]53[/B]
Any help would be great thanks !
 
Last edited:
Back