Facebook Twitter Reset

Count distinct records or values and display it using mysql and php

This tutorial shows you how to count unique records with mysql and display it using php. Very simple to understand. This line count(<COLUMN_NAME>) AS count_me simply means that the count value is assigned to variable count_me and we...

Set xampp:- Apache Mysql Filezilla Mercury Tomcat as a windows service and get xampp to start automatically on boot up

Set xampp- Apache,Mysql, Filezilla, Mercury and Tomcat as a windows service and get xampp to start automatically on boot up. For this first we need to install xampp on windows. Refer this LINK ON HOW TO INSTALL XAMPP or we have a set of tutorials...

Simple Mysql table with AUTO_INCREMENT attribute

The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows: Here i am creating a simple TABLE named login_details, with COLUMNS id, uniqid, Manager, email, Account_Name. C REATE TABLE login_details ( id MEDIUMINT...

Search null value or fields in mysql

This is a simple query in mysql which will return the null fields in a column from a table . This is the Select statement. S3LECT * from TABLE_NAME where COLUMN_NAME is null or COLUMN_NAME=''; This statement.[Here i am setting a value 'no'...

Display mysql table using for loop in php

This tutorial will show you how to display mysql tables using for loop instead of while in php. Very simple script just grab it guys. //please dont forget to connect to mysql $objDB = mysql_select_db('my_db'); $qry_acct='SELECT * From My_test_table'; $result_acct=mysql_query($qry_acct)...

To insert the new column after a specific column using mysql

This query will show you how to insert a new column after a specific column in mysql. For example :- To insert the new column after a specific column, such as name, use this statement: ALT ER TABLE contacts ADD email VARCHAR(60) AFTER name; If...

Find the sum of multiple fields inside a table in mysql

Very simple query to find out the sum of multiple fields inside a mysql table. Lets say we have 2 numeric fields , COL1 and COL2 then the mysql query to find the sum of those two field is SELECT SUM(COL1) + SUM(COL2) FROM TABLENAME VN:F...

Reset all the table values in Mysql

This is a simple mysql query to reset all the table values including the auto increment id inside the table. //reset all the table values TRUNCATE TABLE tablename; VN:F [1.9.13_1145]please wait...Rating: 0.0/10 (0 votes cast)VN:F [1.9.13_1145]Rating:...

Mysql backup via cron using php and email the file

This script will show you how to take complete website mysql backup via cron using php and email the backup file as attachment. < ?php $datestamp = date("Y-m-d"); // Current date to append to filename of backup file in format...

Website slow due to remote mysql server using php solution

Now a few of my projects are getting much bigger and the need for having dedicated Database servers are now more appealing than ever. With MySQL when setting it up I noticed that when trying to access a remote database from an application server,...

Export MySql database table to pdf using php

This is an easy method of exporting mysql database table content to pdf using php and FPDF library. DOWLOAD LIBRARY HERE Download dbtopdf.php file here Remember to rename it to SOMETHING.PHP OR Just save the above file as dbtopdf.php and load...

Simple Visitor Counter Using php

This tutorial require 1 PHP file and 1 table of mySQL database. 1. counter.php 2. Database “mypage” and table “counter” with 1 fields: visitor(Int, 11). You need to insert a first one record with “0″. Counter.php Source...

Export MySQL to CSV (Excel) using php

You can export your MySQL database to .csv file format (Microsoft Excel file) easily using php. This tutorial require 1 PHP file and 1 table of mySQL database. 1. exportcsv.php 2. The table is with 2 fields: id(auto_increment), name(varchar,...
Affordable Seo PackagesSeo BlogEdu Backlinks