August 15, 2018

How to Delete / Modify Data from a MySQL DB using PHP

freewaredownload.in free PHP MYSQL SCRIPTS

FREE PHP SCRIPT SOURCE CODE

PHP SCRIPT SOURCE CODE FREE

PHP SQL DB FREE SCRIPTS

How to Delete / Modify Data from a MySQL DB using PHP

DELETE FROM table_name
WHERE some_column = some_value



<?php

$con = mysql_connect("localhost","DBUser","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("my_dbname", $con);

mysql_query("DELETE FROM TABLENAME WHERE LastName='Meher'");

mysql_close($con);
?>


How to Modify or update Data from a MySQL DB using PHP

UPDATE table_name
SET column1=value, column2=value2,…
WHERE some_column=some_value



<?php
$con = mysql_connect("localhost","DBuser","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("my_dbname", $con);

mysql_query("UPDATE TABLENAME SET Age=36

WHERE FirstName='Meher' AND LastName='Irani'");

mysql_close($con);
?>

Developers Homepage Download Free now

 FREE PHP CODE

PHP Script Description:

SQL

The PHP Script can modify or delete a Certain Record or a group of Records from a MySQL DB using a parameter like Age or LastName.

Note: Copy the Source Code to notepad or any other good text editor and save as .php or .html or .css as the case may be. Give your own file name, if not described in the script.

SQL

RELATED FREEWARES

[catlist id=18]
[catlist id=5]

::