Re: do table alias's work in PHP?
| From: | Johannes Janson | Date: | Wed, 16 May 2001 21:07:29 +0000 |
| Subject: | Re: do table alias's work in PHP? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9374@lists.php.net to get a copy of this message | ||
I'm not sure but couldn't it really be that this is
due to the MySQL version? PHP is just passing
a string which is then executed by MySQL. I think
I recall having no problems with aliases. I don't quite
remember which version it was but I think it was 3.23.*.
> Now I am using a shareware version which, perhaps, is buggy:
> 3.22.24-shareware-debug
Probably is a problem of the version...
I simply had to test it again. Here's very simple a script that worked fine.
$sql = "SELECT a.id as ida, b.id as idb FROM alleuebungen a,
allevorlesungen b WHERE a.id=b.id";
$result = mysql_query($sql) or die(mysql_error());
while (list($ida, $idb) = mysql_fetch_array($result)){
echo "$ida, $idb<br>";
}
I'm using 3.23.36.
hope it helps
Johannes