Hi, is it possible to print the sql query? i mean
i want to print the output of the command "SELECT * FROM members;"
and output it into html, i tried
print $result; -- it gives me different output..
> Resource id #2
ty,
louie...
# PHP SCRIPT ###
something like
someColumnInTable;
echo $row->someOtherColumnInTable;
}
?>
-- Original Message --
From: "louie miranda" <[EMAIL PROTECTED]>
Date: Fri, 4 Jan 2002 04:45:57 +0800
Hi, is it possible to print the sql query? i mean
i want to print the output
use
$sql = "select .. ";
$result = mysql_query($sql);
echo $sql;
--- louie miranda <[EMAIL PROTECTED]> wrote:
> Hi, is it possible to print the sql query? i mean
> i want to print the output of the command "SELECT * FROM
> members;"
> and output it into html, i tried
>
> print $result; -- i
A quick rewrite of your code:
";
}
?>
Your question was how to print the query, in this case you'd just print
$sql. That was the point of the above but I got a bit carried away :) Oh,
mysql_error() can be very useful for debugging. Regarding the type
resource, have a look here:
http://ww
4 matches
Mail list logo