wordpress_add

Tuesday, 12 November 2013

MySQL Update Query In php..!!!

Dr-Wordpress : easy way to use update query in MySQL ( php )....!!!

<?php
ob_start();

 $db_name = 'database_name';
  $db_user = 'root';
  $db_pass = '';
 $db_host = 'localhost';
 $connection = mysql_connect($db_host, $db_user, $db_pass);
  mysql_select_db($db_name);

 ?>


$sql = "UPDATE $tablename  SET $column_name = '$value' WHERE Id='$id'";

   mysql_query($sql) or die(mysql_error());


Subscribe Dr-Wordpress for Important Knowledge of wordpress..your's suggestions are most welcomed.

No comments:

Post a Comment