Search the Community
Showing results for tags 'forum'.
-
Hello all, I am busy with a complete user management script and have the following questions: Is it good practice to combine the "view users" and "search users" scripts in the same PHP file? How do I amend the "SELECT COUNT(user_id) FROM users" query for pagination purposes to accommodate the search functionality? In its current form it continues to displays ALL the pagination links after a search query. Is there a more efficient way to formulate the following search query: "SELECT u.user_id, u.username, u.type, c.country, u.email, u.status, DATE_FORMAT($date_created, '%Y-%m-%d %H:%i:%s') AS dc FROM users AS u INNER JOIN countries AS c USING (country_id) WHERE lang_id = {$_SESSION['lid']} AND u.username LIKE '%" . $terms[0] . "%' OR u.type LIKE '%" . $terms[0] . "%' OR c.country LIKE '%" . $terms[0] . "%' OR u.email LIKE '%" . $terms[0] . "%' OR u.status LIKE '%" . $terms[0] . "%' OR date_created LIKE '%" . $terms[0] . "%' ORDER BY $order_by LIMIT $start, $display" I have searched online but could not find any workable solutions. Any help will as always be much appreciated.
- 5 replies
-
- forum
- pagination
-
(and 1 more)
Tagged with:
-
I want to integrate the forum example in the book into my website, except I would modify it so that I could have multiple forums with different topics on my site. What I want to know is what columns and tables do you think I should add to my forum database. To add to the example in the book, I thought of creating a new forums table, and in it having the forum_id column, as well as the thread_id foreign key column. I am new at this so if you have any suggestions at populating my forums table that would be great.
-
Hi I've created the Message Board site as per the book but for some reason the Date & Time on both the Forum.php and read.php page aren't displaying. I've tried the supplied code as well as my own and neither work so I'm assuming it might be a php setting or MySQL setting? I've run the site using XAMPP on my MacOSX and also on my rented server. I don't know if it makes any difference but the php.ini file timezone is set to... date.timezone = "Europe/London" Can you help please, many thanks Grant