05-27-2010, 10:03 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Location: Nashville, TN
Posts: 66
Thanks: 20
|
insert cast
How in the word do you use CAST with mysql? I've tried google for a basic example with no luck. Could somebody help me out with a basic example?
I am trying to insert something like 555.555 into a float column but I either get 555 or 555.6 in the column after the insert. *shrug*
Code:
$station_insert = mysqli_prepare($link, "INSERT INTO stations (Company_Name, station_name, Address, City, State, Country, Zip, Phone, Lat, Lon ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
mysqli_stmt_bind_param($station_insert, 'ssssssiiss', $company_name, $station_name, $address, $city, $state, $country, $zip_code, $phone, $lat, $lon);
I've tried ii, ss and dd on the when binding... is CAST what I need to use for the lat and lon floats?
__________________
I am not a programmer, nor do I play one on tv.
|
|
|
|