Welcome Guest, Not a member yet? Register   Sign In
Query multiple tables and echo the result
#4

[eluser]gmask[/eluser]
The `entries` table has an entry with the following structure
Code:
id -> '1'
title -> 'My Title'
content -> 'My Content'
category -> '1'
The `categories` table has an entry with the following structure
Code:
id -> '1'
title -> 'General'
In case I wasn't too clear in the first post what I want is to be able to change the
Code:
$entry->category
call in my view.php to display the corresponding category title instead of its id (which is obviously stored in the entry table itself). I understand this requires two queries, but I'm not sure how to go about it.

Thanks!


Messages In This Thread
Query multiple tables and echo the result - by El Forum - 09-07-2010, 01:28 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 12:59 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 01:34 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 01:51 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 02:21 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 02:22 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 02:23 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 02:24 PM
Query multiple tables and echo the result - by El Forum - 09-08-2010, 05:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB