Which DB?
If it is MySQL, as example, you can simply use REGEXP syntax "^[a-zA-Z0-9]+$" 
via SELECT

Regards

> From: sono...@fannullone.us
> To: php-general@lists.php.net
> Date: Wed, 2 Sep 2009 20:47:15 -0700
> Subject: [PHP] Searching on AlphaNumeric Content Only
> 
>       Is there is a way to search only for the alphanumeric content of  
> field in a db?  I have an itemID field that contains item #'s that  
> include dashes, forward slashes, etc, and I want people to be able to  
> search for an item # even if they don't enter the punctuation exactly.
> 
>       Here's an example:  let's say there is an itemID of 4D-2448-7PS but  
> someone omits the dashes and searches on 4D24487PS.  Is it possible in  
> PHP to have the find be successful, even if the search criteria  
> doesn't exactly match what's stored in the field?
> 
>       If this is possible, I'd appreciate it if someone could just point me  
> in the right direction so I can read up on it.
> 
> Thanks,
> Frank
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

Reply via email to