Blog Archives

Find mysql_query issue


Paste the code below mysql_query or mysqli_query to find correct issue,recently i used it in project and found that table itself not exited in database. if (!$res) { printf(“Error: %s\n”, mysqli_error($this->conn)); exit(); }

Tagged with: , , , , , ,
Posted in php

Points to Remember in Yii


1)Yii application is build using Model-View-Controller(MVC) architecture. 2) Yii implements two kinds of model form model (CFormModel class) and active records(CActiveRecord class),which are extended by same base class cmodel. 3)form model represent the logic for form fields validation and bussiness logic.

Tagged with: , , , , , ,
Posted in php, yii framework

How configure php in environment varible for windows?


To configure php in environment variable for windows,just run below code with current wamp path in command prompt: SET PATH=%PATH%;C:\your\wamp\path\php C:\>php -a Interactive mode enabled <?php echo ‘pppp’; echo “hello world”; ?> ^Z echo ‘pppp’; hello world to finish the

Tagged with: , , , , , ,
Posted in php

speed test to class with public variable and function vs static variable and function


Currently refreshing the oops concept in php as i worked in drupal cms which almost functional oriented derived cms. public variable and function inside class: /**  *  * Used to list the brands in the car  * class:car  * function:carlist()

Tagged with: , , , , , , ,
Posted in php

object oriented php pdo connection


I have created two class to config and register class to add the email id to database. Why did I used pdo to connect? ANS:SImple sanitize the input data to protect the database. Config.php <?php //db connection class using singleton

Tagged with: , , , , ,
Posted in php
Follow php tutorial on WordPress.com
categories
Calendar
July 2017
M T W T F S S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Follow me on Twitter
Blog Stats
  • 74,622 hits