Hello Andrew, Friday, March 14, 2003, 7:41:56 PM, you wrote:
A> yes you are right an I am very stupid for not doing this: It is very important A> for debugging as I now have this error :):) A> Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in A> c:\program files\apache A> group\apache\htdocs\punterspower\admin\updatecompanyresponse.php on line 23 A> Error with query: You have an error in your SQL syntax near 'WHERE ItemID='01296 A> 483402'' at line 14 A> I'm not really happy because I dont know why!! A> Andrew :: cut :: >> >>A> mysql_connect("$DBHost","$DBUser","$DBPass"); >>A> mysql("$DBName","UPDATE items >>A> SET ItemSKU='$ItemSKU', >>A> ItemName='$ItemName', >>A> ItemDescription='$ItemDescription', >>A> PostCode='$PostCode', >>A> Category='$Category', >>A> CityID='$CityID' >>A> CTelephone='$CTelephone' >>A> Cfax='$Cfax' >>A> Cemail='$Cemail' >>A> Caddress='$Caddress' >>A> Cfax='$CTown' >>A> Cwww='$Cwww' >>A> WHERE ItemID='$ItemID'"); >> >> >>A> Andrew >> >>A> --------------------------------------------------------------------- >>A> Before posting, please check: >>A> http://www.mysql.com/manual.php (the manual) >>A> http://lists.mysql.com/ (the list archive) >> >>A> To request this thread, e-mail <[EMAIL PROTECTED]> >>A> To unsubscribe, e-mail <[EMAIL PROTECTED]> >>A> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php >> >>There are few simple steps, that everyone should do when using MySQL >>within PHP. >>1. $connection = mysql_connect('host', 'user', 'pass') or die("Error >>with connect: ".mysql_error().""); >>2. mysql_select_db('db_name', $connection) or die("Error with select: >>".mysql_error().""); >>3. $query = ""; >>4. $result = mysql_query($query, $connection) or die("Error with >>query: ".mysql_error().""); >> >>This steps will provide you information if anything goes wrong and >>most import where it goes wrong. >> >>From what you wrote, you didn't placed enough commas in the query. >>Follow the steps described above and paste the error log. >>www.php.net and www.mysql.com are your friends! >> :: cut :: >> Okay, I'm not very sure about this, but try ItemID=$ItemID. If it's not this, then look up your code above. Check if all quotes are closed properly. If it's still not working then, please, paste your code as is, 1:1 :) -- best wishes, Strahil Minev a.k.a. DLHelper, BuFu TeaM mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php