umerated array (numerical)
print $row[1];
Or use a function like mysql_fetch_assoc instead:
$row = mysql_fetch_assoc($result);
print $row['id']; // with id being a column name
// selected via the query
print $row['name'];
And lastly, if you're
What's your code look like, something like this?
$result = mysql_query("SELECT name FROM tablename");
while ($row = mysql_fetch_array($result)) {
print "Name : ". $row['name'] . "\n";
}
The above is the most standard way at least. Share your appropriate
snippet of code, could be a few rea
here:
http://www.php.net/manual/en/language.types.resource.php
Regards,
Philip Olson
On Fri, 4 Jan 2002, louie miranda 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
Do. Not. Cross. Post.
Use ONE mailing list at a time.
Please have all further replies to this unfortunate thread
go to php-general and only php-general.
Regards,
Philip
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php