Daniel Kullik wrote:
[EMAIL PROTECTED] wrote:

here is the whole query:

$query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix',
firstname='$firstname', lastname='$lastname', job_title='$jobtitle',
company_name='$company',
no_of_employees='$employees',address_1='$address1',address_2='$address2',
address_3='$address3', town='$town', county ='$county', postcode='$postcode',
country ='$country', telephone_number='$telcode.$telnumber',
fax_number='$faxcode.$faxnumber', email='$email', enterprise='$enterprises',
optin_thirdparty='$distribute', optin_news='$market'";


only the telcode gets inserted.

many thanks,

luke m




"Jay Blanchard" <[EMAIL PROTECTED]> wrote:


[snip]
telphone number =$telcode.$telnumber'
but only the telcode gets written to the database.
[/snip]

There is not enough here to know for sure (I am betting this is part of
a query), but if your code looks like the above you are missing a single
quote after the =. Now, if you enclose the variables in the single
quotes without other manipulation it will probably not work as expected.
Can we see the whole query?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Hiya.

Hmm... should't the query look like this:
INSERT INTO table (col1, col2, ...) VALUES ("val1", "val2", ...);

SET is used for UPDATE-queries.


Daniel


Argh, sorry. I should have checked to MySQL manual before posting. The syntax you're using is also correct. But actually you don't need to concatenate strings here. Leave the dots and try it again.


Daniel

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to