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
snicolas
Forum Commoner
Posts: 97 Joined: Tue Nov 09, 2004 8:32 am
Post
by snicolas » Wed Jan 26, 2005 11:01 am
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jan 26, 2005 11:08 am
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 » Wed Jan 26, 2005 11:15 am
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jan 26, 2005 11:20 am
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 » Wed Jan 26, 2005 11:22 am
mmm.
PHP and SQL SERVER?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jan 26, 2005 11:38 am
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 » Wed Jan 26, 2005 11:41 am
thank you, that, indeed, fixed the problem...