Forum Moderators: coopster

Message Too Old, No Replies

Error Number: 1305 :FUNCTION strtoupper does not exist

strtoupper doesn't exist

         

calmseas

11:01 pm on Aug 28, 2010 (gmt 0)

10+ Year Member



When I execute the following, I get a "Error Number: 1305 :FUNCTION ... strtoupper does not exist"

$query="UPDATE users SET last = strtoupper('last')" ;

Is not strtoupper a standard function?

Thanks in advance.

bhukkel

5:51 am on Aug 29, 2010 (gmt 0)

10+ Year Member



strtoupper is php code in mysql it is upper (i assume you use mysql).

Anyango

2:48 pm on Aug 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try UCASE mysql function

rocknbil

7:43 pm on Aug 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a mysql error, not a PHP error. Since you haven't quoted the select statement, mysql is trying to interpret it as a command like

$query = "update table set dtfield=curdate()":

strtoupper is not a function in mysql. Try

$query="UPDATE users SET last = '" . strtoupper('last') . "'" ;

ucase (the mysql equivalent) will also work.

calmseas

10:20 pm on Aug 30, 2010 (gmt 0)

10+ Year Member



Got it! Thanks to you all for your suggestions.