Re: Query Help Needed
| From: | Payzillee | Date: | Thu, 29 Nov 2001 12:11:31 +0000 |
| Subject: | Re: Query Help Needed | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76017@lists.php.net to get a copy of this message | ||
I've got my names, web addresses etc. set up as Varchar and my telephone/fax
numbers as Bigint. Special interests field as text. Only other field in
the database is an auto increment number field.
"Michael Hall" <admin@openlearningcommunity.org> wrote in message
news:Pine.LNX.4.21.0111300709040.1553-100000@localhost.localdomain...
>
> Do those field names need single quotes too? Can't remember right now ...
> Are there any datatype problems (wrong kind of datatype for a field)?
> What about a semi-colon at the end?
>
> Mick
>
> On Thu, 29 Nov 2001, Payzillee wrote:
>
> > Hi, could anyone tell me what is wrong with this Insert query? I get
an
> > 'Invalid query' error but I can't see the problem at all. All the
fields
> > match exactly what is in my database, it's all in lowercase too.
> >
> > Cheers.
> >
> > mysql_query ("INSERT INTO listserve (title, surname, forename,
job_title,
> > org_name, address1, address2, address3, address4, city, region,
postal_code,
> > country, email, mob_phone, tel_number, fax_number, org_web_address,
> > personal_web_address, special_interests, date, time)
> >
> > VALUES ('$title', '$surname', '$forename',
> > '$job_title', '$org_name',
> > '$address1', '$address2', '$address3',
> > '$address4', '$city', '$region',
> > '$postal_code', '$country', '$email',
> > '$mob_phone', '$tel_number',
> > '$fax_number', '$org_web_address', '$personal_web_address',
> > '$special_interests', '$date','$time')")
> >
> >
> >
> >
> >
> >
>
> --
> ################################
> Michael Hall
> admin@openlearningcommunity.org
> m.hall@latis.net.au
> http://openlearningcommunity.org
>
>