[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) |
[eluser]mrtavo[/eluser]
[quote author="OverZealous.com" date="1247528895"]After apparently enough caffeine has gotten into my system, I finally found out that the problem IS within DataMapper / DMZ, and, yes, it can be fixed. Here's the temporary solution: search for and replace 'left' with 'left outer' in the libraries/datamapper.php file. I'm planning on implementing this anyway, as that is more appropriate syntax (they are synonymous with each other). It should be fully supported across all databases, since LEFT OUTER JOIN is the correct SQL term.[/quote] Sorry, but I am still having problems with this. I changed 'left' with 'left outer' in the library, but I still have problems. Here is another attempt that I made. Code: $query = " The result is this. select Bs.* from Bs left outer join As as As /* the real name is not As so this is not a problem */ ON Bs.id = As.Bs_id WHERE As.id = '10' stdClass Object ( [Bs.id] => 1 [Bs.name] => XX [Bs.description] => XX ) 1 (gives an object that is the true result) Con DMZ A Database Error Occurred Error Number: 1 SQL logic error or missing database SELECT Bs.* FROM (Bs) LEFT OUTER JOIN As as As ON Bs.id = As.Bs_id WHERE As.id = '10' The difference between both querys are those parenthesis around "From '('Bs')'", using CI db object and that query gives the same error. Could those parenthesis be the problem ? ( so estrange ) Looking to the sqlite documentation "sqlite Language: Select", at the "single source" statement seems to be correct. So, I don't know what to do, it seems that finally I'm doing something wrong. I'll keep on trying **UPDATE: 'left' and 'left outer' are equivalent in sqlite too, I've done another try with the same querys with 'left' instead of 'left outer' and the result is the same, so that is not the problem. Sorry for being so heavy and noob ![]() |
Welcome Guest, Not a member yet? Register Sign In |