Category: web development
-
Zend: Join doesn’t work in my model
Zend provides JOIN, joinLeft, joinRight keywords to join two or multiple tables. you can make an sql object by calling select function of current model by: $select = $this->getDbTable()->select(); Use below line to use JOIN terms in your SQL: $select->setIntegrityCheck(false); By default its integrity value set to True and it do not allow to use…
-
Zend: How to use multiple conditions at delete time?
Zend provides a facility to delete a row from the database table using the delete() method. This method takes one argument, which is an SQL expression that is used in a WHERE clause, as criteria for the rows to delete. For example : $modelObj = new ModelName(); $where = $modelObj >getAdapter()->quoteInto(‘id = ?’, ‘1235’); $modelObj…
-
CSS: Opacity in all browsers
Today’s market is based on 3D and most things are doing by jQuery or Javascript to make fast loading application. Opacity is a part of CSS to make transparent image without PNG format. To set the opacity property to an image you can use: .img_transparent_class{ opacity: 0.5; } But this line will suitable for some…
-
Joomla: Why all articles are showing on frontpage in joomla?
If you are new to Joomla then you will do this silly mistake definitely. because in most cases new user don’t aware from all terms of joomla and its admin panel. Joomla created for best content management system and during write the code, developers kept in mind each small users requirements. When you are creating…
-
Joomla: How to check if the current page is Home Page or not in Joomla
Joomla is a best custom management open source tool. It provides many type of functionality regarding theme, module and components. During development time we need to create some special function to use on home page only. or we can say that sometimes we want to show something (content) on the home page only. Joomla says…
-
Linux: How to use serach command in Linux?
In windows we can easily find the any file in the folder and it doesn’t matter that how many folders inside that folder.. and it is possible by pressing F3 key on the keyboard. But in the linux we have to use command prompt to find such type of searching. In ubuntu we can do…
-
PHP Motion: Captcha code is not working
When you install the phpmotion on your system you will find that captcha code is not showing on registration page. open includes/captcha.php and replace var $font = ‘DoradoHeadline.ttf’; by var $font = ‘./DoradoHeadline.ttf’; Tweet This Post
-
Ubuntu: How to start and stop LAMP server
To view any changes in php.ini file or some LAMP server files we should restart the apache server again. and you can do this by following commands: sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start Above both commands will stop the apache server and start again. But you can do restart apache server by single command only:…
-
Ubuntu: Installing Xdebug on Ubuntu LAMP
We are assuming that you have installed LAMP on your ubuntu operating system. But you are not getting errors in php files when file has any syntax or fatal error. So you see these errors by following below steps: Open you php.ini file by below command: sudo gedit /etc/php5/apache2/php.ini First confirm your php.ini file location…
-
MySQL: How to delete X day old entries
In some cases we need to remove old entries from the database or remove entries before specific days. So mysql provides the syntax to delete records: DELETE FROM $table_name WHERE $date_field < date_sub(CURDATE(), $numberOfDays day) If above query does not work for you then its version issue. So you can do same thing like this:…
-
Javascipt: how to use nl2br function
In php we have a function to replace nl2br means new line to break format. but when we need this functionality in our javascript code then what we do? We can do by simply manner: function nl2br(value) { return value.replace(/\n, “”); } Above function will return the converted ‘\n’ to ‘‘. But above function has…
-
Joomla: $this->baseurl is not working in custom template module
Joomla provides some basic themes which are already installed in the templates folder. When any developer develop the CMS in the joomla , he use his own template with new design. On the index page $this->baseurl works well but when he want to own module then he create a folder in custom template folder. But…
-
Javascript: How to check is valid number or not
Numeric validation require in mostly cases when we want that user enter only numeric value in any text field. For example ‘Age’ field. Obviously, age can not be in string format. Above, I have mentioned javascript function to check that entered value is numeric or not. Please enter only numeric value : Tweet This Post