A simple select statement ... Duhhh !!!
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

A simple select statement ... Duhhh !!!

From: Angelos <angelos@redcatmedia.net>
Date: Tue Dec 20 2005 - 15:12:22 CET

Hello,
I have the folowing table:
-----------
| content |
-----------
|id |
|parentId |
|title |
-----------

I want to select all the table records but I want in the ParentColumn to
return the title instead of the ID.

If it was in two different tables I would doit using SELECT * FROM t1,t2
WHERE t1.id = t2.parentId

BUT they are in one table.
Can anyone give me a hint ?

I think it should be reallyt simple but I am stuck.
Received on Fri Dec 23 20:15:51 2005