Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How come float types takes string

Status
Not open for further replies.

iffoiffy

Programmer
Feb 24, 2005
67
CA
Hi,

I have type float for retail price. Follwing sql seems correct

$sqlstring= "update products set brand = '$brand' , brand_id = '$brand_id' , model = '$model' , description = '$description' , retail_price = $retail_price where product_id ='$prod_id'";

But I noticed even if I put "'" around retail price it takes it and updates, shouldn't it gives me an error as i am trying to put string in float type


$sqlstring= "update products set brand = '$brand' , brand_id = '$brand_id' , model = '$model' , description = '$description' , retail_price = '$retail_price' where product_id ='$prod_id'";

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top