Welcome Guest, Not a member yet? Register   Sign In
Error Number: 1096 when using db->query()
#1

[eluser]tolyx[/eluser]
Why does this perfectly valid SQL statement (which executes without any issues in Navicat/PHPMyadmin)...

Code:
SELECT posts.*, users.display_name AS author_name, CONCAT(users.firstname," ",users.surname) AS author_fullname FROM posts INNER JOIN users ON users.id = posts.created_by WHERE posts.post_type = "post" AND posts.post_status = "publish" AND posts.date_created <= 1244415600 ORDER BY posts.sticky DESC, posts.date_created DESC

...result in an error when using db->query()?

Code:
Error Number: 1096

No tables used

SELECT *

I have specified FALSE as the second parameter.
#2

[eluser]TheFuzzy0ne[/eluser]
Please post the actual Active Record code you're using.
#3

[eluser]tolyx[/eluser]
Ah never mind, reverted to using individual functions... works fine.




Theme © iAndrew 2016 - Forum software by © MyBB