Thursday 23, October 2014
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

Delete From Statement

DELETE FROM statement is used to delete rows from a database table. The general syntax is as under.

Syntax
DELETE FROM tablename WHERE columnname = value

 

Example:
Table Name(empinfo)
FirstName
LastName
Email
DOB
Steve
Martin
smart.steve@studiesinn.com
08-04-1988
David
Fernandas
davidfernandas@studiesinn.com
04-16-1977
Ajay
Rathor
ajayrathor@studiesinn.com
08-24-1986

 

$con = mysql_connect("localhost:3306","adam","123456");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());

  }

mysql_select_db("mydb", $con);
$result = mysql_query("Delete From empinfo  where FirstName=’Steve’");
mysql_close($con);
?>

 

FirstName
LastName
Email
DOB
David
Fernandas
davidfernandas@studiesinn.com
04-16-1977
Ajay
Rathor
ajayrathor@studiesinn.com
08-24-1986

 

 

 
     
   
PHP Tutorial
 
  Introduction
Introduction
  Variables
Variables
  Strings
Strings
  Operators
Operators
  If Else Statement
If Else Statement
  Loops
Loops
  Functions
Functions
  Forms
Forms
  Sessions
Sessions
  Cookies
Cookies
  Files
Files
  E-mail
E-mail
  Error Handling
Error Handling
  File Upload
File Upload
  PHP Databases
PHP Databases
  Connecting to a MySQL Database
Connecting to a MySQL Database
  MySQL Data Types
MySQL Data Types
  Inserting Data Into a Table
Inserting Data Into a Table
  Select Statement
Select Statement
  Where Clause
Where Clause
  Order By
Order By
  Update Statement
Update Statement
  Delete From Statement
Delete From Statement
 
 
 
Web Designing Tutorials
  HTML Tutorial
HTML Tutorial
  DHTML Tutorial
DHTML  Tutorial
  CSS Tutorial
CSS Tutorial
  XHTML Tutorial
XHTML Tutorial
 
Programming Languages Tutorials
  C Language Tutorial
C Language Tutorial
  C++ Tutorial
C++ Tutorial
  Java Language Tutorial
Java Language Tutorial
  Data Structure Theory Tutorial
Data Structure Theory Tutorial
 
Server Side Scripting Tutorials
  PHP Tutorial
PHP Tutorial
  SQL Tutorial
SQL Tutorial
  ASP Tutorial
ASP Tutorial
 
Client Side Scripting Tutorials
  JavaScript Tutorial
JavaScript Tutorial
  VBScript Tutorial
VBScript Tutorial
 
 
 
POPULAR E-BOOKS
 
Download Generate a Passive Income  Ebook Generate a Passive Income
   
Download Pajama Paycheck Ebook Pajama Paycheck
   
Download An Insiders Guide To Writing Articles Ebook An Insiders Guide To Writing Articles
   
Download An Introduction to Computing  Ebook An Introduction to Computing
   
Download Communication Network Analysis  Ebook Communication Network Analysis
   
     
Studiesinn.com 2014 All Rights Reserved.
 
Website Designed & Developed by TechXprtz