I am newbie to android development. I am using android studio for developing an application. Things i have done Created a DB with two tables in it in MySQL. Created two separate api’s for both GET and POST methods. Successfully accessed both api’s What i have achieved for now Able to GET data form the GET api. Able to POST
Tag: yii
Yii : How to add datepicker in order to filter gridview
Here is my codes in order to show some relation tables data in the controller and it is view code I want to add a date picker to view and use it in order to filter GridView I am new in yii2 please advise me Answer first of all install any datepicker widget i.e 2amigos date picker in your index
Yii deleteAll() records with condition
I’ve set up a log in process where a verification code is generated, and when successful, is then removed. However, i want to make sure that if there’s multiple verification codes for the same user, …
Yii – findAll with order by
How to findAll with specific column with order by desc ? Code bellow worked and find all from the developer id $id = Yii::app()->user->getState(‘id’); $models = Games::model()->findAll(‘…
SQL Query to join multiple tables
I have 4 tables that I need to connect in order to get the reports that I need. But I’m confused on how to write the query. Below are the sample of the tables: Client Table Consultant Perm Temp The end result of the report that I want to show is something like this: I’m trying to use the LEFT
Yii radioButtonList: always takes the default value as the selected value
I have Yii radio button list as follows. forgotpassword1.php This is the action for forgotpassword1. Here I call a function named “ChangePassword()” from my backend application. One of the parameters passed to the backend is send_type: mobile or email. The problem is it will always takes mobile as the send_type. I’ve used to set the default value as mobile. Why
Yii2 Multiple instances of the same model
I want to get multiplie instance of the same model in my controller. I saw this wiki for Yii 1.1 and tried like that but in my code only last instance in form was acceble from controller my code is here (I commented code with error and variable values): It is my form view in _form.php: It is log result
Turning YII_CSRF_TOKEN secure flag on
I have enabled CSRF Validation in Yii: ‘enableCsrfValidation’ => true, Everything works as expected however I’d like for the session cookie to have the secure flag turned on. With other cookies you can set the secure flag in the config: How do you do this for the YII_CSRF_TOKEN? Answer You can’t do that with the built in CHttpRequest component. You
How to change the database connection in YII
I have yii application,, and i want to change the database connection.. first, my app is connect to ‘trackstar’ database, and later i want to change to ‘taskmanagement’ database.. So i just simply change the dbname in my code : but when i run the app i got error : CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table
Yii hasAttribute and Custom Fields
How can I use hasAttribute with Custom Fields? Code: EXAMPLE Model.php Code: Answer You should simply use : https://www.php.net/manual/en/function.property-exists.php hasAttribute will only check for db attributes.