mpluss
(Mahdi Mastouri)
1
Hello all,
I want to run this sql command "SHOW TABLE STATUS LIKE TableName" to know the value of "Auto_increment".
I used these instructions :
$row = $model->getDbConnection()->createCommand('SHOW TABLE STATUS LIKE TableName')->queryRow();
$nextCmd = $row["Auto_increment"];
CDbException : ‘CDbCommand failed to execute the SQL statement’.
have you any idea ?
Thankyou.
junxiong
(Garry3peace)
2
maybe you should put the quote to the TableName become like this
"SHOW TABLE STATUS LIKE 'TableName'"
mpluss
(Mahdi Mastouri)
3
Thank you junxiong, the inclusion of quote has solved the problem 