Archive

Tag MySQL

PayUMoney: PHP payment gateway integration

Posted on May 7, 2017 by Suresh Kamrushi in PHP

+110 Today i have integrated PayUMoney to my website, thought of sharing. Here i am sharing how a developer can integrate PayUMoney payment getway to …

Mysql error due to reserve words in query.

Posted on October 18, 2016 by Suresh Kamrushi in Mysql

+5-3 Sometime it happens, you create field name or table name with reserve keywords in mysql. And than try to run query using that keyword, …

Mysql Event scheduler

Posted on September 18, 2016 by Suresh Kamrushi in Mysql

+2-1 I have already posted a blog (Event Scheduler an alternative to cronjob) with different advantages of Even scheduler over cron job, here I am …

How to convert Base64 string from IOS to image in PHP

Posted on March 31, 2016 by Suresh Kamrushi in PHP

+12-1 Today I learn how you can store images in folder, posted using IOS or Android application to PHP server. APP need to registered a user and …

Finding nearest location using latitude and longitude.

Posted on August 12, 2015 by Suresh Kamrushi in Mysql

+54-11 Here I am explaining how you can find nearest latitude and longitude with user entered latitude and longitude. Here i am trying to search …

Codeigniter storing session data in database

Posted on July 22, 2015 by Suresh Kamrushi in PHP

+21-5 Due to the limitation of storing cookies in browser, we can not store bulk data in session. If we want to store more data we …

Mysql varchar max length

Posted on July 7, 2015 by Suresh Kamrushi in Mysql

+20-5 Maximum data what we can store in varchar in mysql was 255. But after Mysql version 5.0.3 varchar can store maximum of 65,535 characters. …

Migrating content/node from drupal 4.x to drupal 7.x

Posted on April 11, 2014 by Suresh Kamrushi in PHP

Drupal having a huge support with version 6 > but with 4.X with no support and 5.x with limited support.
Initially I install few module to import node/content with CSV/XML but they are not working as expected. I need to import content first which include mainly title, description images(more than one) and attachments (more than 1) for each
content. I checked feed, taxanomy csv import, migrate and couple of more but they are able to upload content but not images and attachements.

Generating ERD using PHPMyAdmin

Posted on March 5, 2014 by Suresh Kamrushi in Mysql, PHP

Today I need to generate ERD for my Database. If you search on net you will get number of people suggest Workbench for it but as i am using PHPMyAdmin as an GUI for my Mysql database I just don’t want to install workbench only for generating ERD. And above all when PHPMyAdmin support it (from 3.4 version) than what more I need.

How to access remote mysql server using local phpmyadmin

Posted on February 28, 2014 by Suresh Kamrushi in Mysql, PHP

It is very tough to connect your remote mysql box especially when you are working with VPN. Initially I used telnet to connect to mysql box than I try to use workbench. Workbench is good and better than using telnet but again it consume more memory and if VPN got disconnected it just hanged. It so irritating. Than I try to integrate my PHPMyAdmin to configure to access remote mysql server and it is really very easy to setup.

Date manipulation with mysql..

Posted on February 10, 2014 by Suresh Kamrushi in PHP

There are various instance when we do date calculation on date / unix datetime fields.Following are some example as how to use inbuilt functions of mysql which will reduce doing calculation in PHP, I hope it will help someone:

Maximum Number of Columns Per Table – Mysql

Posted on January 31, 2014 by Suresh Kamrushi in Mysql

The maximum row size constrains the number of columns because the total width of all columns cannot exceed this size. For example, utf8 characters require up to three bytes per character, so for a CHAR(255) CHARACTER SET utf8 column,

Mysql Event Scheduler an alternative to cronjob.

Posted on January 31, 2014 by Suresh Kamrushi in Mysql

Mysql introduce Event scheduler which we can use alternative to Cronjob. There are many advantages over cronjob like:
1) It is directly written on Mysql Server.
2) This is platform independent. Your application might be written in any language it does not matters. You just need to know mysql.

Different ways to find 2nd highest salary from employee table

Posted on December 15, 2013 by Suresh Kamrushi in Mysql

Now a days i am conducting PHP / Mysql interview for my organisation. And came across many of resumes with 3-4 years of experience in web development. But couple of developer given me the correct answer to this question. That is what i think i should share this.

Mysql Query : Nth highest salary from employee table

Posted on August 10, 2013 by Suresh Kamrushi in Mysql

You can write query in number of ways, but i list few of them which are easy to write and understand. Mysql having advantage of writing query with “limit”, by which you can handle start and end point.

Example to use variable in Mysql

Posted on August 10, 2013 by Suresh Kamrushi in Mysql

After a long time i used variable in SQL queries.
This time i have to calculate time/days difference between added date of a particular news and current date, so that viewers get how old a particular news is.

How Mysql reduce overhead from PHP!!!!!

Posted on August 10, 2013 by Suresh Kamrushi in Mysql, PHP

I enjoy to play with Mysql queries. what i learn from my past experience is,if you are doing a maintainance project or you are handling a project which is developed by some other developer and he mess up with the database definitions, than you “WILL LEARN A LOT NEW THINGS”…………. How?

MySql Function Between.. AND in LEFT JOIN

Posted on August 10, 2013 by Suresh Kamrushi in Mysql

If we are storing range of values in a field in a table and we want to see what are the values falling between these range, we can use “Between.. and” function along with Left Join in Mysql.

CodeIgniter : Loosing session data after login

Posted on August 10, 2013 by Suresh Kamrushi in PHP

In Codeigniter after login I am storing all the data into session and redirecting to some controller.But i am loosing all values in that controller and code redirect back to login page. I try every trick to debug this issue but fail!!!

Implementation of User permission with PHP & Mysql Bitwise operators.

Posted on August 10, 2013 by Suresh Kamrushi in Mysql, PHP

Another way to implement user permission in your application and also a good use of bitwise operator. This can be done with PHP as well as Mysql.

Here I am showing how we can implement it with Mysql.

Maximum Number of Columns Per Table – Mysql

Posted on August 10, 2013 by Suresh Kamrushi in Mysql

+9-3 Maximum we can have 4096 columns per table, but exact limit depends on several factors, listed below: 1) Every table has a maximum row …

PHP-Mysql Interview Questions

Posted on August 10, 2013 by Suresh Kamrushi in Mysql, PHP

Some PHP interview question i am sharing with you, which are really interesting and upgraded my knowledge. It might help you out…:)