parse error (with coding)

From: Date: Sat, 13 Nov 2004 18:21:27 +0000
Subject: parse error (with coding)
Groups: php.db 
Request: Send a blank email to php-db+get-37260@lists.php.net to get a copy of this message
hi i had created an inventory management system..using php on sqlite....i can successfully insert the values in it..but when i try to delete an item it is giving me an error...i think there is some logical problem in delete statement... can anyone help me in figure out this error.. thanks in advance... i am attaching the code <HTML> <HEAD> <title>View Inventory</title> <body topmargin="0" leftmargin="0" bgcolor="#D2E9FF"> <table cellSpacing="0" cellPadding="0" width="100%" bgColor="#003366" border="0"> <tr> <td width="60%"><p align="center"><font color="#ffffff" size="7" face="Century Gothic"><b> University of New Orleans</b></font></td> </tr> </table> <table cellSpacing="0" cellPadding="0" width="100%" border="0" height="30"> <tbody> <table cellSpacing="0" cellPadding="0" width="100%" border="0" height="30"> </HEAD> <body> <?php $db ="/home/saravall/.HTML/office.db"; $handle = sqlite_open($db) or die("could not open database"); if(isset($_POST['submit'])) { if (!empty($_POST['tagno'])) { $insquery = delete from inventory where tagno=1; insresult = sqlite_query($handle,$insquery) or die("error:".sqlite_error_string(sqlite_last_error($handle))); echo "<i>successfully deleted!</i>"; } else { echo "<i>hahah!!!</i>"; } } $query = "SELECT * FROM inventory "; $result = sqlite_query($handle,$query) or die("err:".sqlite_error_string(sqlite_last_error($handle))); if (sqlite_num_rows($result) > 0) { echo "<table cellpadding=20 border=1>"; while ($row = sqlite_fetch_array($result)) { echo "<tr>"; echo "<td>".$row[0]."</td>"; echo "<td>".$row[1]."</td>"; echo "<td>".$row[2]."</td>"; echo "<td>".$row[3]."</td>"; echo "<td>".$row[4]."</td>"; echo "<td>".$row[5]."</td>"; echo "<td>".$row[6]."</td>"; echo "<td>".$row[7]."</td>"; echo "<td>".$row[8]."</td>"; echo "<td>".$row[9]."</td>"; echo "</tr>"; } echo "</table>"; } sqlite_close($handle); ?> </body> </html> __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

« previous php.db (#37260) next »