Month: August 2019
Unsupported extensions disabled: how to re-enable blocked extension in Chrome
The first error occurred because my extension did search in an HTTP (unsafe) domain, so I changed it to HTTPS to resolve. 2.1 – I was using an addEventListener with anonymous function, to fix I created a function to be passed in addEventListener; 2.2 – I gave names of words reserved to the functions, to […]
Chrome Web Store: Removal notification
Dear Developer, We routinely review items in the Chrome Web Store for compliance with our Program policies to ensure a safe and trusted experience for our users. Your item “myAPP,” with ID: XXXXXXXXXXXX, is being taken down as it currently does not work or provide any functionality upon installation. Items on the Chrome Web Store […]
Small Move, Big Change – Caroline L. Arnold
The author tells us that the idea of how micro resolutions are fully achievable. It’s the way we achieve our goals without so much suffering and frustration. To demonstrate this, the book brings a very comprehensive view with many examples such as family, employment, money, friends, diet, relationships among other numerous approaches. The key point […]
CDbCommand Yii 1
A good practice of programming is to use “statement”, to do CRUD actions in a safe and scalable way. The Yii framework has by default its library for ease of development. SELECT Queryng with the template referencing the primary key: INSERT DELETE
The 4-Hour Workweek
The 4-Hour Workweek – Timothy Ferriss It’s a book that has many positive points, such as fighting for having a sufficient income, administering your work remotely, taking extended and clear vacations, working 4 hours a week, among others. But I don’t agree with forging a disease or producing less at work just to get a […]
Yii Error: include(Controller.php): failed to open stream: No such file or directory
This error occurred because the references to the classes were not equal to the file name, but the application was always installed on Windows Server, which is not “case sensitive “, so it worked. The error appeared from the moment we put it on AWS with a Linux server, which is case sensitive. But to […]
Yii Error: CDbConnection failed to open the DB connection: could not find driver
Error: CDbConnection failed to open the DB connection: could not find driver C:\xampp72\htdocs\DEV\project\protected\models\SystemConfiguration.php(50) Solution: In php.ini, enable the configurations according to the base used: extension=mbstringextension=exif ; Must be after mbstring as it depends on itextension=mysqli;extension=oci8_12c ; Use with Oracle Database 12c Instant Client;extension=odbc;extension=openssl;extension=pdo_firebirdextension=pdo_mysql;extension=pdo_oci;extension=pdo_odbcextension=pdo_pgsqlextension=pdo_sqliteextension=pgsql;extension=shmop
Yii Error: permission denied for relation my_table
ERROR: permission denied for relation site_adzone This error occurs because you need to give the database user permission. Solution, execute the query: GRANT ALL PRIVILEGES ON TABLE userdb.table_xpto TO userdb;
Moeda | Tipo | Valor |
Dollar | Compra | R$ 5,97 |
Dollar | Venda | R$ 5,97 |
Data | 22/01/2025 |
Yii Model
27 de August de 2019
Yii
No Comments
adrianoApi
Yii Model Delete <?php $model=User::model()->findByPk($id); if($model){ $model->delete(); } # OR $model=User::model()->deleteAll(); # OR $model=User::model()->deleteAll(array(“condition”=>”userid=’$id'”)); # OR $mode=User::model()->deleteAll(“status=’A'”); ?> Yii Model Update <?php $model=User::model()->updateByPk( $ID, array(“status”=>’DECLINED’) ); # OR $model=User::model()->updateAll(array( ‘first_name’=>”$firstname”, ’email’=>”$email” ), “UserID=$id and status IS NULL ” ); # OR $model=User::model()->updateAll( array(‘status’ => 1), ‘UserID =’.$userid ); ?>
yii