try echoing the sql statement before execution to see if the variables are correctly set...also you can cut n paste the sql into phpmyadmin or some other gui to test the statement for correctness (like quotes in the correct place etc)


From: Aravalli Sai <[EMAIL PROTECTED]>
Subject: [PHP-DB] searching an entry in inventory db
Date: Sat, 4 Dec 2004 10:14:52 -0800 (PST)

  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'])) {
    if (!empty($_POST['tagno']))
$insquery ="select
inventory where
$insresult = sqlite_query($handle,$insquery) or
echo "<i>successfully found!</i>";
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...

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around

PHP Database Mailing List (
To unsubscribe, visit:

-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to