Spanning all data across 3 lists
Posted: Tue Nov 11, 2008 2:58 pm
Guys, I have a slight problem.
Ok so I have a table (LEFT) joined:
n_id = the news id
n_title = the news title
g_title = game category title
g_id = game category id
What I want is to get all the data in the news table and count how many rows of data their are:
Now what I am having problem with is, I want to span the news over 3 lists alongside each other like so:
| 1/3 of the data | 2nd 1/3 of the data | last of the 1/3 of the data |
How would I go about doing this?
Regards,
Joe.
Ok so I have a table (LEFT) joined:
Code: Select all
SELECT news.n_id, news.n_title, news.n_date, games.g_title, news.g_id
FROM games
LEFT JOIN news
ON games.g_id = news.g_id
ORDER BY news.g_idn_title = the news title
g_title = game category title
g_id = game category id
What I want is to get all the data in the news table and count how many rows of data their are:
Code: Select all
$selectnews = mysql_query("SELECT * FROM news");
$num_rows = mysql_num_rows($selectnews);| 1/3 of the data | 2nd 1/3 of the data | last of the 1/3 of the data |
How would I go about doing this?
Regards,
Joe.