vendredi 26 février 2016

PHP- error when trying to get info from SQL

This code is trying to get information from a table called R but I am getting an error on line 6:

Parse error: syntax error, unexpected T_LOGICAL_OR in get_R.php on line 6

I've looked it over as well as a good few of my colleagues and we cant figure it out. Here's a copy of the code:

<?php

function get_R( $s) {
(
$t = mysql_query ( $s) ) or die (mysql_error() );
if (mysql_num_rows($t) == 0) or die ("<br> No data in R<br>");


$out = "" ;
$out .=
    "<table style= \" color:red ; background:line; \" >";

/*................................*/
while ( $r = mysql_fetch_array($t) ) {
    /*.....................*/
};
    $out .= "....";
    return $out;
}
?>

Any ideas?

Aucun commentaire:

Enregistrer un commentaire