php - MySQL ENUM value is not saved when calling stored procedure through PDO -


i have created stored procedure:

create procedure logadd(     in log_title varchar(128),     in log_type enum('message','warning','error'),     in log_info text )  deterministic  modifies sql data  comment 'insert new log entry'  begin     insert `tbl_logs` (         `title`,         `type`,         `info`     )     values (         log_title,         log_type,         log_info     ); end 

which works when executed data directly added in query. when bind parameters, type column, of enum type, not saved (is empty). can see value sent string:

$stmt = $pdo -> prepare("call logadd(?, ?, ?)"); $stmt -> bindparam(1, 'message title'); $stmt -> bindparam(2, 'message'); $stmt -> bindparam(3, 'message information');  $stmt -> execute(); 

why isn't enum value saved?


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo