[SOLVED] Disallowed implicit conversion...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

[SOLVED] Disallowed implicit conversion...

Post by snicolas »

Grrrrrrrrrrrrrr.....
PHP & SQL
Getting this error when trying to insert value in SQL.
The data type of the column is money

my query is simple
$thecash= "5.55";
$sql=Insert into a (price) values('convert(money,$thecash)');

what's wrong????

s
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

total guess here: maybe it's your quoting the function call?
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

Post by snicolas »

it's nice to guess, but it's not really helpfull this kind of answer...
especially when you're stuck...
I am still learning, not a pro and wish other coders "share" their huge knowledge....
Do you have to beg now?

s
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I have no idea what SQL language you're using... Because there are so many, I'm not going to go look at all of them.. help us out here.
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

Post by snicolas »

mmm.
PHP and SQL SERVER?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

did you even try removing the quotes? Cause that sure looks like what's needed.
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

Post by snicolas »

thank you, that, indeed, fixed the problem...
Post Reply