SQL Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

SQL Error

Post by ianhull »

Hi again guys,

another little problem here, well, little to you probably.
Awkward as anything to me.

Here is the code I am using but I get a SQl error

Code: Select all

<?php session_start();
include_once("connect.php");
$idnum = $_POST['recordnum'];
$inpContent = $_POST['inpContent'];
$companyid1 = $_SESSION['companyid'];
$update = "UPDATE `procedures` (`Cpro`) VALUES ('$inpContent') WHERE id='$idnum'";
mysql_query($update) or die(mysql_error());
The error is:

You have an error in your SQL syntax near '(`Cpro`) VALUES ('
myupdatetext</STRON' at line 1

Please, please, please help.

Thanks.
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

[SOLVED]

Post by ianhull »

Problem Solved
Post Reply