how to search an entry in php sqlite db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi
  i am trying to find(search) an entry in the
inventory data base system ...i want to find the entry
based 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
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...





		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux