Welcome Guest, Not a member yet? Register   Sign In
Simple query

Something tells me this is a stupid question, but i'll ask it anyway

I have a simple table in my db:


FROM pages
WHERE page_parent_id = $page_name

I want to select all pages where page_parent_id = $page_slug.
Do i have to run 2 querys to get the page_id of the $page_slug given ? Or is this possible in 1 query?

Use UNION(as I remember). With Codeigniter's ActiveRecord I slowly started to forget MySQL :-)

Theme © iAndrew 2016 - Forum software by © MyBB