Welcome Guest, Not a member yet? Register   Sign In
db->join("table", "column = " . $int) ... uses backticks and gives an error!

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:

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

Theme © iAndrew 2016 - Forum software by © MyBB