Using Substring with REGEX (Solution)
| From: | Michael Conway | Date: | Mon, 05 Aug 2002 17:32:03 +0000 |
| Subject: | Using Substring with REGEX (Solution) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-20995@lists.php.net to get a copy of this message | ||
I figured out that I was mixing PHP substr() with mysql SUBSTRING().
The answer is:
"SELECT * FROM $table WHERE item_no RLIKE
(SUBSTRING('$selected_item_no', 1, 10) AND size='$selection'";
On to other problems.
Michael Conway
mconway3@cox.net
(703) 968-8875