On Sep 4, 2012, at 5:27 PM, David McGlone wrote:
I'm having a whole lot of fun playing with this project. It just keeps
expanding and taking me to new territory and I'm really enjoying it.
I got a
quick question though. I've been playing around with table joins and
to join based on the ID but I quickly realized this is not a good
because the ID's in each table aren't always going to match. This is
join that I was messing around with:
$sql = 'SELECT * FROM inventory, extended_info WHERE inventory.id =
So I'm wondering if I should figure a way to always make my ID's in
match, which is probably not possible or I'm thinking a unique field
tables and use that to match up the records, but I know zilch about
(funny considering what I chose to start with) and I couldn't think
of 1 thing
that would be unique to match up... LOL so what would be a wise way
about this type of thing.
PS I'm not looking for code, just some feedback on logic.
I think your needing to do something like this.
$sql = 'SELECT in.id FROM inventory in, extended_info ex WHERE in.id =
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php