Results 1 to 3 of 3
Jul 18, 2009, 06:29 #1
- Join Date
- Sep 2007
- 0 Post(s)
- 0 Thread(s)
PDO - how to bind columns in separate tables to a same value
I've found The PHP Anthology (PA) extremely useful for improving my knowledge after beginning with Kevin Yank's Introductory PHP/MySQL (KY) book.
However one thing that is missing from The PHP Anthology (PA) is the following:
KY regularly uses SELECT statements from multiple tables and a typical SQL SELECT statement might look like this:
SELECT * FROM animals, animal_homes WHERE animals.homeId=animal_homes.id;
Nowadays I'm using PDO Prepare and Execute as recommended in PA. However I don't know how to bind two columns to the same value as with the statement above where column animals.homeId is bound to column animal_homes.id.
Would be very grateful for some help on this one, since I really want to persevere with Prep Ex.
Thanks a million