Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Thursday, 22 August 2013

How To Check If Two Or More Rows Have The Same Field Value ?


you want to filter details from db.


The Problem :


I want to select the first row with the last name "usama" and then I want to skip the next row which has the same field "usama".

Monday, 12 August 2013

how to start PHP / Mysql Connection

here is a simple connection between php and mysql. in 5 steps .


Step 1
create the db 

CREATE DATABASE `mydb`;
USE `mydb`;
CREATE TABLE `employee` (
   `id` int UNIQUE NOT NULL AUTO_INCREMENT,
   `first_name` varchar(40),
   `last_name` varchar(50),
   PRIMARY KEY(id)
);
INSERT INTO cars VALUES('usama','saad');
INSERT INTO cars VALUES('hasan','hamaky');
INSERT INTO cars VALUES('noor','sobhy');