Author Topic: Plugin, select all workspaces  (Read 3240 times)

lexoyo

  • Freshman
  • *
  • Posts: 18
    • View Profile
Plugin, select all workspaces
« on: April 20, 2012, 11:01:50 am »
Hi
To select all workspace i use this request

"SELECT * FROM `"+Config.TABLE_PREFIX+"objects`
  WHERE "+Config.TABLE_PREFIX+"objects.id in (SELECT "+Config.TABLE_PREFIX+"workspaces.object_id
  FROM "+Config.TABLE_PREFIX+"workspaces)"

I would like to select workspaces which are the children of a given parent  workspace.... But I could not find the table with this info

rafj

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Plugin, select all workspaces
« Reply #1 on: April 20, 2012, 05:40:10 pm »
look into table fo_members

lexoyo

  • Freshman
  • *
  • Posts: 18
    • View Profile
Re: Plugin, select all workspaces
« Reply #2 on: April 21, 2012, 04:26:50 pm »
Thanks, it works
Here is how my request looks like :)

SELECT * FROM fo_objects WHERE fo_objects.`id` in (SELECT fo_workspaces.`object_id` FROM fo_workspaces) AND fo_objects.`id` in (SELECT id FROM fo_members WHERE `parent_member_id`="3")