Script: http://www.developphp.com/video/PHP/SQL-LIKE-Syntax-UNION-and-AS-Alias-with-Filters Part 3 of MySQL PHP Search Programming Exercises for …
source
Script: http://www.developphp.com/video/PHP/SQL-LIKE-Syntax-UNION-and-AS-Alias-with-Filters Part 3 of MySQL PHP Search Programming Exercises for …
source
30 responses to “3. MySQL PHP Search Programming : SQL LIKE Syntax UNION and AS Alias with Filters Tutorial”
sir can u make a rating new bar in php mysqli
Nice Tutorial that you made good
Hey Im trying to do a search but my $value sometimes contains especial characters like (.-/) etc how can i do the query?
Hi adam! When i try to search, others would show correctly and some wont show correctly even if theres a record in the database. The word are the same, just confuse why it wont show. My example is Filter: Gender Search: Female, it would show the female and male.. it wont filter
showing error The used SELECT statements have a different number of columns
When i try to search i get
Successful database connection, happy coding!!!
Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:xampphtdocssearchsearch.php on line 22
Warning: mysql_query(): A link to the server could not be established in C:xampphtdocssearchsearch.php on line 22
Access denied for user ''@'localhost' (using password: NO)
but i know the mysql is there because in the connect_to_mysql.php i get Successful database connection, happy coding!!! can you please help me out?
hey i m getting this error plz help me.. -> Unknown column 'pagetitle' in 'field list'
is it possible to Union 3 SELECT Statements ?
thank's a lot bro.
You explain things like a champ! Keep up the good work!
Great tutorial Adam! However, I found out that that there is a typo where it says: " if($count > 1)"; that should be "if($count > 0)". That took me some time to figure out (thank you), but time well spent to get experience! Maybe, you can elaborate on converting MySql code to MySqli? That would be awesome! Kind regards, F.
how to use radio button or checkbox for search?
Do you know,how to concatenate the results into a html link?
I'm not very good at php.So,wondering whether you can help me on this issue
Yes bro u are right
Hi! For some reason, only the words Adam used as examples returned actual results with the code that I copied from his site. Other words like 'disney', 'javascript', 'calculator', etc…return 0 results…how is this possible?
how would you add your pagination to this search engine?
The error also tells me that the query was empty even though it was not
The additional code so far is
if(isset($_POST['filter1' == "Make Selection"]) && $_POST['searchquery'] != ""){
//form to reset 2 blank
}
I have added another option to the listbox, advising the user to make a selection. My objective is so that if the end user enters text in the searchbox but does not choose an option from the dropdown then a message will echo out at the top of the form advising them to make a selection from the list as well as enter a search term however I am getting the following message – Undefined variable: sqlCommand in line 22. Wondered if someone could enlighten me.
You will need to concatenate the results into a html link a tag
Dude u sound like stallone from rocky. ive been thinking about that through ur whole tuts.
Hi ur tutorials are excellent here i have a doubt about search i have 4 tables which are linked between each other with relevant ids. my question is how can i search from these tables. tables are products- fields are id, product name, price and details.
product_categories- fields are id and categories.
product_subcategories- fields are id and subcategories.
and product_categories_taken- fields are id, pid(id from products), pcid(from product_categories) , and psid (from product_subcategories).
DUDE, You saved me!!! How did I not see that that was my error??? Thank you so much, I feel so dumb for not seeing that before, haha
Great tutorial, just ignore the last 4 minutes of it where he explains that you need to add
an extra field to your tables and set default values
The correct and easier way to do this would be to add
SELECT id, page_title AS title, *** 'pages' as tableName ***WHERE …..
(don't add the ***) – do the same for 'blog'.
You can then reference this as if it was a column. ($columnName = $row['tableName'];
Hope this helps someone.
Thank you Adam, Really its great tutorial and more relabel coding…..
Thanks a lot …..
Please can you put a video for HTML form that post data to MySQL database?
+ if you are planning to support UTF8, this regexp will not match UTF8. You can add p{L} to match UTF8 characters (non-punctuation) and better to replace (space) match with class s , matching all space-like characters like tabs etc.
Good Luck !
entertaining and informative.. 🙂
i hate his random FAT ASS humor
This was the first series of yours I ever watched. Ironically I have not ever had to use search code until now So I revisited this. Got it going great in minutes. Then it took about 3 hours to figure out why some searches were not happening even though the same code worked great in Php MyAdmin. Long story short………..
if($count > 1 Hmmmmmmmmm Maybe it should be if($count >= 1 Or even if($count > 0 ? Just saying………