Notes on Reference Citations - Version 2.71, by Dr. Herong Yang
how to insert a value in a column with another value
'INSERT INTO - Inserting New Records' tutorial was cited in a DreamInCode forum post in 2009.
The INSERT INTO - Inserting New Records tutorial was cited in a DreamInCode forum post in 2009.
Subject: how to insert a value in a column with another value Date: 30 Jul, 2009 Author: fallen0ne09 Source: http://www.dreamincode.net/forums/index.php ?&showtopic=117566&hl= i want to insert a value using mysql query but i cant seem to make it work... i tried where or be but it does not work here is my code could anyone help me. <?php #MySQL-Insert-Into.php # Copyright (c) 2007 by Dr. Herong Yang, http://www.herongyang.com/ # $con = mysql_connect("localhost", "root", ""); $ok = mysql_select_db("shimm", $con); $msg = $_POST['description']; $date = date("Y-m-d"); $sql = "INSERT INTO data (description) where pid desc limit 1 " . " VALUES ('$description')"; ... pid is my key... and i want to add some values in a column... and this error keeps popping out. Sending statement failed. 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where pid desc limit 1 VALUES ('')' at line 1 could anyone help me i dont know what to do next... i really appreciate it..
Table of Contents