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());
<?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());
No comments:
Post a Comment