Retrieve more data
-
- Posts: 7
- Joined: Thu Feb 23, 2012 11:25 am
Retrieve more data
According to your blogging tutorial data from post and comment table is retrieved. But what if I want to retrieve data from categories table and which has a cat_id, cat_name and users table that has u_id and user_name. So in the get_posts() function I want the cat_name and user_name to retrieve this thing. Clear with the question? Please let me know. In my posts table there is p_id, p_title, p_body, cat_id, user_id
Re: Retrieve more data
I'm not sure I understand what your problem is. Are you trying to fetch information from another table?
What have you tried so far?
What have you tried so far?
-
- Posts: 7
- Joined: Thu Feb 23, 2012 11:25 am
Re: Retrieve more data
Actually yes.. and with that the progress is something like I tried to expand the sql statement that was made by Jacek but it didn't go so good..
Re: Retrieve more data
You would probably have to write a new sql statement.
SELECT `cat_id`, `cat_name`, `u_id`, `user_name` FROM `another_table`if that is what you mean. Without seeing any code I'm not actually too sure what you want to accomplish