I try rewrite one application from MySQL to PostgreSQL.
In MySQL I have SQL statement:
SELECT u.guid, u.*
FROM ossn_users as u
WHERE(u.time_created IS NOT NULL)
ORDER by u.guid ASC
LIMIT 0, 10;
In Postgres I got for this statement error. ERROR: column u.guide must appear in the GROUP BY clause or be used in an aggregate function
I modified SQL statment for PostgreSQL to this:
SELECT u.guid, u.*
FROM ossn_users as u
WHERE(u.time_created IS NOT NULL)
GROUP by u.guid, u.type, u.username, u.email, u.password,
u.salt, u.first_name, u.last_name, u.last_login,
u.last_activity, u.activation, u.time_created
ORDER by u.guid ASC
LIMIT 0 OFFSET 10;
But in application it does not work.
Please help!
How I could modify MySQL statment to fit PostgrSQL needs.
Thank you.