db->join("table", "column = " . $int) ... uses backticks and gives an error!

#8
[eluser]kurucu[/eluser]
What he's doing is joining a table that doesn't share a key with the table to which it is being joined, but does relate to the data.

e.g. we have business, divisions and people tables, where people belong to a division, and divisions belong to a business. Also, people belong to a business (in his model).

He is (I think) doing something like this:

Code:
SELECT * FROM people JOIN business ON business.id = 1 WHERE people.business_id = 1

It would work, but I question the model, even if I did make it up myself.

If this is what is being planned, then the manual will tell you how to turn off backticks for certain functions (e.g. select and query, I think).


Messages In This Thread
db->join("table", "column = " . $int) ... uses backticks and gives an error! - by El Forum - 09-29-2009, 08:00 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.