note 36608 added to function.mysql-fetch-object

From: Date: Thu, 16 Oct 2003 06:11:03 +0000
Subject: note 36608 added to function.mysql-fetch-object
Groups: php.notes 
Request: Send a blank email to php-notes+get-58676@lists.php.net to get a copy of this message
In reviewing Eskil Kvalnes's comments (04-Mar-2003 11:59 When using table joins in a query you obviously need to name all the fields to make it work right with mysql_fetch_object()) I was left asking and, as a newbie, the reason why I'm here. I have a 28 field table. Ran SELECT * with a LEFT JOIN, etc and it appears to have worked on my test server without issue. On further reading, MYSQL.COM has the following: * It is not allowed to use a column alias in a WHERE clause, because the column value may not yet be determined when the WHERE clause is executed. See section A.5.4 Problems with alias. * The FROM table_references clause indicates the tables from which to retrieve rows. If you name more than one table, you are performing a join. For information on join syntax, see section 6.4.1.1 JOIN Syntax. For each table specified, you may optionally specify an alias. Aware of the fact there's a difference between tables and fields there appears to be confusion here somewhere. ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-object.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36608 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36608&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36608&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58676) next »