[snip]
Is the above statement true when the id field is numeric (which it
surely is
in this case)? I get the expected results (in mySQL) when using
statements
like
SELECT name FROM table WHERE id=1
with no single quotes round it. Putting quotes round integer values is
counter-intuitive - is it ne
From: Paul Waring [mailto:[EMAIL PROTECTED]
> On Mon, Jul 11, 2005 at 03:25:33PM +0100, Mark Rees wrote:
> > with no single quotes round it. Putting quotes round
> > integer values is counter-intuitive - is it necessary
> > in some cases?
>
> If the field is a numeric type (e.g. INT) as oppose
On Mon, Jul 11, 2005 at 03:25:33PM +0100, Mark Rees wrote:
> with no single quotes round it. Putting quotes round integer values is
> counter-intuitive - is it necessary in some cases?
If the field is a numeric type (e.g. INT) as opposed to numeric data
being stored in a character field (e.g. a te
""Jay Blanchard"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
$query= "DELETE FROM sheet1 WHERE id=$id";
You have an error in your SQL syntax; check the manual that corresponds
to
your MySQL server version for the right syntax to use near '' at line 1
[/snip]
try...
$query
Ross wrote:
I dunno if my text book is out of date or I have made a syntax error but I
am trying to delete a record with
$query= "DELETE FROM sheet1 WHERE id=$id";
$result= mysql_query($query);
if($result){
echo "it was deleted";
}
else
echo mysql_error();
}
and I get the followi
[snip]
$query= "DELETE FROM sheet1 WHERE id=$id";
You have an error in your SQL syntax; check the manual that corresponds
to
your MySQL server version for the right syntax to use near '' at line 1
[/snip]
try...
$query= "DELETE FROM sheet1 WHERE id = '".$id."' ";
Note the single quotes around
6 matches
Mail list logo