***
paul@paullee.com wrote/escribió (19 Jan 2005 07:23:33 -0800):[color=blue]
> $result=mysqli_query($db, $query);
> echo $result;
>
> I get "Object id #2" displayed on screen.[/color]
From manual (
http://es2.php.net/mysqli_query):
Return Values
Returns TRUE on success or FALSE on failure. For SELECT, SHOW, DESCRIBE or
EXPLAIN mysqli_query() will return a result object.
So it's normally not a good idea to print an object: printing works fine
with strings, integers... but not with objects.
Just look at the examples on the page, they're pretty clear.
In any case, if you're learning PHP I suggest you forget (by now) about the
mysqli_* functions: they're rather recent and only work with PHP 5+ and
MySQL 4.1+ (not the most common scenery). Try mysql_* instead:
http://es2.php.net/manual/en/ref.mysql.php
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--