Archive for the ‘ MYSQL ’ Category

Home > Web Development > MYSQL

Search

Categories

Archives

MySQL Best 30 Performance Tips

MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists many different client programs/libraries. Very useful tips for all mysql DBA’s, Developers. Minimize traffic by fetching only what you need. Paging/chunked data retrieval to limit Don’t use SELECT * Be wary of lots of small quick queries if [...] Read more..

Store Daily Alexa Report into MySQL using PHP Simple HTML DOM Parser

My company asks me to take daily alexa report manually. I took for more than 3 months. But, after that, i got bored in doing manual works. Becuase, nearly i needs to take more than 20 websites per day. It’s eats my time and structs in my remaining works. So, i searched for solution online [...] Read more..

Combine 2 MySql results using array on PHP

Main theme of this article is, searching values in 2 different MySql queries and combining both results as array using array_combine() and array_push(). Explanation is given under source code. <?php //connection parameters $username = “root”; $password = “”; $dbhost = “localhost”; $database = “test”; //Array creation $table1array = array(); $table2array = array(); $finalarray = array(); [...] Read more..

Drawing Dynamic Online Graphs from MySQL Data

I was terrified at the idea of creating dynamic statistical graphs, fortunately there is a free solution where the complicated graphical stuff is reduced to a library include. JpGraph are the providers of this PHP based solution which appears to be the de-facto package. Learn more here http://www.aditus.nu/jpgraph JpGraph is a Object-Oriented Graph creating library [...] Read more..

Ordering Text Field Numerically(A MySQL Trap)

If whatever reason you have numbers stored in a text field (char, varchar etc)then watch out if you try and do an order by as it will do the sort alphanumerically this means it will sort 1,10,2,3,4,5,6,7,8,9 when you would expect 1,2,3,4,5,6,7,8,9,10. There is a work-around namely SELECT names FROM your_table ORDER BY names + [...] Read more..

Import large SQL databases with phpMyAdmin

The default import limit in phpMyAdmin is 2MB. In this post I will show how you can overcome this problem and import your large database backup.Let’s take for example that you have successfully exported a backup of your website database in SQL format having a size of 15MB. With apache2 and php5 installed you need [...] Read more..