Results 1 to 3 of 3
Thread: Small Query confusion
Jun 20, 2011, 11:21 #1
Small Query confusion
Having a small problem with my query below. I'm sure I've done something like this before so am not sure what is causing a problem.
Basically I want the meta_ids from the column meta_id where post_id = $currentPost.
SELECT meta_id FROM posts_meta WHERE post_id = $post_ID
But for some reason, even if I remove teh WHERE qualifier, it will only return the earliest meta_id rather than the three test entries I have in place. I var_dump'd the array returning the results and the rows aren't present so while I'm not sure I do think this is an issue with my query and not the PHP side.
Am I missing something obvious here?
For context, this is the code I'm using around the query.
Jun 20, 2011, 11:28 #2
- Join Date
- May 2007
- Poole, UK
- 79 Post(s)
- 0 Thread(s)
Jun 20, 2011, 11:31 #3
Hmm...I would've thought $row would contain all the results before I would then just extract them.
This solved the problem anyway, thanks SpacePhoenix.