sunnysidesounds Posted October 19, 2009 Share Posted October 19, 2009 Hey guys, I know this is more of a MYSQL question then a php question. But I do feel like both go hand in hand. I just wanted some input as to how I could improve the performance of this query: $query = 'SELECT '.PROJECT_TABLE.'.uid, '.PROJECT_TABLE.'.title, '.PROJECT_TABLE.'.description, '.USER_TABLE.'.proj_id FROM '.PROJECT_TABLE.', '.USER_TABLE.' WHERE '.PROJECT_TABLE.'.title LIKE "%'.$searchProjectNoTags.'%" OR last_name LIKE "%'.$searchProjectNoTags.'%" AND '.USER_TABLE.'.proj_id = '.PROJECT_TABLE.'.uid GROUP BY title LIMIT ' . $startLimit . ', ' . $displayPerPage. ''; This is basically a simple search form that searches in two tables. Project Table and User Table. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/178257-php-mysql-query-can-this-be-formatted-better/ Share on other sites More sharing options...
Mchl Posted October 19, 2009 Share Posted October 19, 2009 Start with this: http://dev.mysql.com/doc/refman/5.1/en/query-speed.html Link to comment https://forums.phpfreaks.com/topic/178257-php-mysql-query-can-this-be-formatted-better/#findComment-939874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.