PFMaBiSmAd Posted February 13, 2012 Share Posted February 13, 2012 The case-sensitive problem is due to the integer account_number column and the use of concat() - Back to your concat() method. If any of the columns are binary strings or numerical data types, the result is a binary string and the comparison will be case-sensitive. The mysql documentation for the concat() function shows how to cast any such fields to a CHAR type so that the resulting comparison would be case-insensitive. Quote Link to comment https://forums.phpfreaks.com/topic/256902-search-case-sensativity-problem/page/2/#findComment-1317868 Share on other sites More sharing options...
Angeleyezz Posted February 13, 2012 Author Share Posted February 13, 2012 yeah i figured the int is the problem, but i use an auto increment so i cant convert it to anything else. see what im doing on my form is i want sql to assign the account number, and manually input the contact information. the same goes with the invoices table, i manually input the customer account number, and sql assigns the invoice #, then i manually add the skus , prices, etc, skus will work the same way on another table sku / description. i think i have the database relation sorted out pretty well, just a matter of my crap lousy php skills to make this work. im a real beginner with php, i see that concat works, but i can't figure out what it actually is, i've tried to read books, but i havnt gotten too far on it, most of the stuff i learned was from looking at other peoples code and picking apart syntax, looking up specifics on the syntax in the books, finding out how they work, etc. a lot of trial and elimination =\ I have to check out what you were talking about with the indexes, and see if i can do something to change that, need to look into it a little more to figure out what you were trying to tell me. im making some progress though, the control panel is coming together a bit more now, hopefully i will be finished with the bare essentials by march 2nd, to actually store the customer information, and their invoices, and be able to search and print them, thats my goal by the time my advertising goes out. I know were not finished yet, but I do want to thank you guys for helping me so far, I love this board and everyone here has always been nice and helpful to me anytime i ever needed any assistance with any project i got involved in. Quote Link to comment https://forums.phpfreaks.com/topic/256902-search-case-sensativity-problem/page/2/#findComment-1317880 Share on other sites More sharing options...
PFMaBiSmAd Posted February 16, 2012 Share Posted February 16, 2012 Here's the information that someone has suggested looking at - CONCAT(str1,str2,...) Returns the string that results from concatenating the arguments. May have one or more arguments. If all arguments are nonbinary strings, the result is a nonbinary string. If the arguments include any binary strings, the result is a binary string. A numeric argument is converted to its equivalent binary string form; if you want to avoid that, you can use an explicit type cast, as in this example: SELECT CONCAT(CAST(int_col AS CHAR), char_col); Quote Link to comment https://forums.phpfreaks.com/topic/256902-search-case-sensativity-problem/page/2/#findComment-1318000 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.