| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Closed Join Date: Jul 2006
Posts: 81
![]() | PHP help needed - again!PHP Code: All help appreciated. |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Dec 2005 Location: Derbyshire, UK
Posts: 887
![]() ![]() ![]() ![]() | For the first part, after this: PHP Code: PHP Code: PHP Code: PHP Code: |
| |
| | #4 (permalink) |
| NamePros Regular Join Date: Jun 2005 Location: UK
Posts: 688
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Try changing that part to: PHP Code: |
| |
| | #5 (permalink) | ||||
| NamePros Regular Join Date: Jun 2006 Location: Sydney
Posts: 251
![]() ![]() |
PHP Code: ALso, you could change it to PHP Code:
__________________ Site Armory, tools for your website | Webmaster SEO Forums | PHP Tutorial and coding forums | ||||
| |
| | #8 (permalink) |
| New Member Join Date: Jul 2006
Posts: 20
![]() | "SELECT * FROM users where username LIKE '%$search%'" is a slow query, and searches through your entire table. Why not rather have "SELECT * FROM users where username = '$search'" assuming the query is being built from the visitor's click on a username? Then also create an index on username for the first 2 or 3 characters? |
| |