From: <[EMAIL PROTECTED]>
$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.

Are you -sure- $telnumber has a value? With that query, you will see both the $telcode and the $telnumber in your database, but because of the way you're doing it, you'll see the literal period you have in the string, too. Now, if "telephone_number" is a numeric column, everything after the non-numeric period character will be truncated (but then why do you have quotes).


So, solution is to join the two outside of the query:

$telnum = $telcode . $telnumber
$query = " ... telephone_number = '$telnum' ... ";

or escape out of the string to join them in the query...

$query = " ... = '$country', telephone_number = '" . $telcode . $telnumber . "', fax_number ... ";

---John Holmes...


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



Reply via email to