Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
if($CONFIG_DBTYPE == 'pgsql') {
- $sql = "SELECT * FROM (SELECT *, (select array_to_string(array_agg(`tag`),',') from `*PREFIX*bookmarks_tags` where `bookmark_id` = `b`.`id`) as `tags`
- FROM `*PREFIX*bookmarks` `b`
- WHERE `user_id` = ? ) as `x` WHERE true ";
+ $sql = "SELECT * FROM (SELECT *, (select array_to_string(array_agg(`tag`),',') from `*PREFIX*bookmarks_tags` where `bookmark_id` = `b2`.`id`) as `tags`
+ FROM `*PREFIX*bookmarks` `b2`
+ WHERE `user_id` = ? ) as `b` WHERE true ";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment