Re: searching an entry in inventory db
| From: | Doug Thompson | Date: | Sat, 04 Dec 2004 19:27:54 +0000 |
| Subject: | Re: searching an entry in inventory db | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37584@lists.php.net to get a copy of this message | ||
Aravalli Sai wrote:
hi i had designed an inventory management system where in i can ADD,INSERT,DELETE,UPDATE the data elements..but when i am trying to find(search) an entry in theinventory data base system (i want to find the entrybased on the "tagno" since this is the primary key in my table) the logic i had written is if(isset($_POST['submit'])) {What does $insquery contain when you echo it?if (!empty($_POST['tagno'])){ $insquery ="select agno=(\"".sqlite_escape_string($_POST['tagno'])."\") from inventory where tagno=(\"".sqlite_escape_string($_POST['tagno'])."\")"; $insresult = sqlite_query($handle,$insquery) or die("error:".sqlite_error_string(sqlite_last_error($handle))); echo "<i>successfully found!</i>"; } else { echo "<i>not found!!!</i>";}} if i run this,it is giving me entire table ...but i want only that particular row whose tagno i had entered... i would appreciate if anyone can figure out this...