Yii Framework Forum: Binding Table Name - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Binding Table Name Rate Topic: -----

#1 User is offline   Jose Serodio 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 27-December 12

Posted 13 February 2013 - 06:38 PM

Hi!

Simple question, with DAO how do you bind the table name, like parameters with bindParam?

Table name is an input from the user, and I want to prevent injection.


Thanks!
0

#2 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 13 February 2013 - 08:06 PM

The only right way in this situation is to use "whitelist" or quote table name http://www.yiiframew...quoteTableName.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users