Welcome Guest, Not a member yet? Register   Sign In
:( Think im going to have to use Regular Expressions :(
#7

[eluser]TornUp[/eluser]
[quote author="BrianDHall" date="1256266678"]You just have to make sure before-hand that you _really_ don't care about anything other than alphanumeric part numbers. If "abc123" is different than "ab-c123" is different than "abc-12-3" - then you need to store the original unsanitized part number for disambiguation. You still run the same query to pull results, but you know you might have multiple results - so you display them all to the user and let them figure out what they really wanted.[/quote]

i think i need to go back to the source, and chat with the sales manager who is requesting this system, just to see if i can get away with stripping everything down to: “abc123” and hope that we don't have a situation where “ab-c123” is different than “abc-12-3”

i intended to store a original copy of the PN in an additional DB column, and display that on the result page, if i choose to go down the special char stripping route.

[quote author="jedd" date="1256260633"]Instead, you could start doing sub-string searches and returning possible options to the user for them to select amongst. This is tried and trusted technology, especially if you do some dynamic ajaxy stuff to show the user potential matches as they type.[/quote]

yeah.. Ajax "suggestive search" is defo somthing i want to put in! but, as with Regular Expressions... frameworks like Jquery blow my mind! lol.. i have a feeling im going to be reading a lot of tutorials soon! hehe


[quote author="jedd" date="1256260633"]Obviously this also depends on just how bad your source data is, and whether it’s easier to clean that up (it sounds like it isn’t) rather than work around it like this.[/quote]

the source data is being imported from an excel file, thats been changed,CnP'ed and all sorts over the last 5-6 years... the data is NOTHING but clean!

this is the additional problem... im dealing with around about 35-40,000 rows(each with 6-7 columns) so sanitising can't be to CPU/ram intensive..


Messages In This Thread
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 09:18 AM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 10:01 AM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 12:22 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 12:42 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 02:17 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 03:57 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 04:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB