|
Posted by wombat on 02/09/07 17:04
In article <1171015644.786212.282790@k78g2000cwa.googlegroups.com>,
"Captain Paralytic" <paul_lautman@yahoo.com> wrote:
> On 9 Feb, 00:56, wombat <6...@k.com> wrote:
> > I'm encountering the following problem:
> >
> > I'm trying to create a new row by:
> >
> > "INSERT INTO object_ix (name, address, phone, active) VALUES ('$a',
> > '$b', '$c', '$d')"
> >
> > The "active" column is an ENUM to be set either YES or NO, however this
> > portion is failing to work. If I take out the "active" column, it works
> > just fine but I can't seem to be able to set an ENUM when creating the
> > row...
> >
> > $d is set with a form using select with options YES and NO.
> >
> > What am I doing wrong here?
> >
> > Any help would be much appreciated. Thanks.
>
> "however this portion is failing to work"
> How is it failing to work? Are you getting an error message? Are all
> the fields apart from that one getting inserted? Is no row getting
> inserted?
> We need a bit more info here than "it doesn't work".
>
> Try echoing the string so that you can see what the final query looks
> like then paste it into phpmyadmin and see what that says about it.
Actually, the issue was a bug in the code I wrote elsewhere... at least
I now suspect. There was no obvious error in the page itself and it took
a few hours of picking through the code track track down the problem,
but that's now fixed. Bugs... gotta love'm.
[Back to original message]
|