escaping multi query

I want to do multi queries like

$sql = 'InsERT INTO table (…);

INSERT INTO table (…);

INSERT INTO table (…);’;

Yii::app()->db->createCommand($sql)->execute();

but what Yii function can I use to escape the user input going into the mysql queries?

what Yii function can I use for multiple queries at once?

Yii::app()->db->quoteValue()

This should do it.

When I use that, it puts unnecessary quotation marks around the input… LIke Jane because ‘Jane’ and when I save again it becomes ‘‘Jane’’

As I know, you cannot do that with Yii becuase Yii use PDO which does not let you to perform multi-queries in one command. You may have to get the connectionString and other connection info from Yii::app()->db to create a pure PHP-MySQl connection and run mysql_query().

mysql_query cannot execute multiple records,- it’ll give you an error. Use mysqli.multi-query instead.