| | |
Search string is too exact help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 14
Reputation:
Solved Threads: 0
Right im very new to php and kinda learning as i go, here is my code.
What it is, is when i search a part number it has to be matching the case e.g if i search a6725 it doesnt work but if i search A6725 its returns the result.
please help!!!
What it is, is when i search a part number it has to be matching the case e.g if i search a6725 it doesnt work but if i search A6725 its returns the result.
please help!!!
PHP Syntax (Toggle Plain Text)
$qresult = mysql_query("SELECT * FROM products WHERE part = \"$pt\""); $row = mysql_fetch_array($qresult); { do { echo "<tr><td>".$row['part']."</td></tr>"; echo "<tr><td>".$row['desc']."</td></tr>"; echo "<tr><td>"; if ($row['part'] <> $pt){ echo $none; } elseif ($row['qt'] == $qty){ echo $limit; } elseif ($row['qt'] >= $qty){ echo $in; } elseif ($row['qt'] <= $qty){ echo $out; } } while($row = mysql_fetch_array($qresult)); } echo "</table>";
•
•
Join Date: May 2008
Posts: 97
Reputation:
Solved Threads: 16
0
#2 Nov 2nd, 2009
php Syntax (Toggle Plain Text)
$query="SELECT * FROM products WHERE part LIKE \"%$pt%\""
Catch me here!
•
•
Join Date: Oct 2009
Posts: 14
Reputation:
Solved Threads: 0
0
#3 Nov 2nd, 2009
solved it thanks anyway used this in the form code
to force it to search in uppercase
ta
PHP Syntax (Toggle Plain Text)
onBlur="this.value=this.value.toUpperCase()"
to force it to search in uppercase
ta
![]() |
Similar Threads
- pls Help!! how to search for string in a file with C# and Web Services?? (C#)
- Search A String for proper format (C++)
- Search A String (C++)
- search in a string (Assembly)
- Search for a string in a variable--- (PHP)
- How to search for a string in a file (C#)
- Search string in a text file (C)
- Search a string of ',' (C++)
- Search in a String, spam in guestbook (ASP)
- New User (C)
Other Threads in the PHP Forum
- Previous Thread: Blowfish Hashing?!?
- Next Thread: Log In Script Problem
Views: 260 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access action ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql mysqlquery oop parse paypal pdf php problem query radio random record recursion regex remote script search security select server sessions sms soap sockets source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





