that seems to be easy:
put every string and varchar in single quotes eg '$surname'
and every number like $fax_number without quotes

regards martin

-----Ursprüngliche Nachricht-----
Von: Payzillee [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 29. November 2001 13:16
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Query Help Needed


error message is 'Invalid Query'.

"Douglas McKenzie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Could be that the value you're trying to insert doesn't match up with
> the field type in the database - you know, putting a word in a number
> field. What exactly is the error message?
>
> 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')")
> >
> >
> >
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to