delete statement problem

I am using a simple delete statement in my php script (below)

$q = "DELETE FROM commenttype WHERE TypeID=".$_POST['selectcat'];

the problem is it doesnt delete the whole row it only deletes the text in
one of the fields of the row. Has anyone else had a similar problem?
It works when I run the sql directly from a program such as mysqlphp

ian
Ian Davies [ Mi, 07 Juni 2006 23:49 ] [ ID #1345594 ]

Re: delete statement problem

please ignore
Ive sorted it
ian


"Ian Davies" <iandan.dav [at] virgin.net> wrote in message
news:2SHhg.15450$x53.7020 [at] newsfe1-win.ntli.net...
> I am using a simple delete statement in my php script (below)
>
> $q = "DELETE FROM commenttype WHERE TypeID=".$_POST['selectcat'];
>
> the problem is it doesnt delete the whole row it only deletes the text in
> one of the fields of the row. Has anyone else had a similar problem?
> It works when I run the sql directly from a program such as mysqlphp
>
> ian
>
>
Ian Davies [ Mi, 07 Juni 2006 23:55 ] [ ID #1345595 ]

Re: delete statement problem

please ignore
Ive sorted it
ian


"Ian Davies" <iandan.dav [at] virgin.net> wrote in message
news:2SHhg.15450$x53.7020 [at] newsfe1-win.ntli.net...
> I am using a simple delete statement in my php script (below)
>
> $q = "DELETE FROM commenttype WHERE TypeID=".$_POST['selectcat'];
>
> the problem is it doesnt delete the whole row it only deletes the text in
> one of the fields of the row. Has anyone else had a similar problem?
> It works when I run the sql directly from a program such as mysqlphp
>
> ian
>
>
Ian Davies [ Mi, 07 Juni 2006 23:55 ] [ ID #1346136 ]

Re: delete statement problem

please ignore
Ive sorted it
ian


"Ian Davies" <iandan.dav [at] virgin.net> wrote in message
news:2SHhg.15450$x53.7020 [at] newsfe1-win.ntli.net...
> I am using a simple delete statement in my php script (below)
>
> $q = "DELETE FROM commenttype WHERE TypeID=".$_POST['selectcat'];
>
> the problem is it doesnt delete the whole row it only deletes the text in
> one of the fields of the row. Has anyone else had a similar problem?
> It works when I run the sql directly from a program such as mysqlphp
>
> ian
>
>
Ian Davies [ Mi, 07 Juni 2006 23:55 ] [ ID #1346150 ]

Re: delete statement problem

please ignore
Ive sorted it
ian


"Ian Davies" <iandan.dav [at] virgin.net> wrote in message
news:2SHhg.15450$x53.7020 [at] newsfe1-win.ntli.net...
> I am using a simple delete statement in my php script (below)
>
> $q = "DELETE FROM commenttype WHERE TypeID=".$_POST['selectcat'];
>
> the problem is it doesnt delete the whole row it only deletes the text in
> one of the fields of the row. Has anyone else had a similar problem?
> It works when I run the sql directly from a program such as mysqlphp
>
> ian
>
>
Ian Davies [ Mi, 07 Juni 2006 23:55 ] [ ID #1346210 ]
Datenbanken » mailing.database.mysql » delete statement problem

Vorheriges Thema: view with parameters
Nächstes Thema: latin1 to utf8