I keep getting the same error:
Unable to update dataYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ssl='O',ecomme rce='O',reselle r='-',dedicated='-',vps='x',affil iate='CJ',green ='-' at line 1
This code works just fine on another site, and all the other php pages work just fine. But this one is driving me nuts trying to figure out the problem. -
<?php
-
$hostname=$_POST['hostname'];
-
$url=$_POST['url'];
-
$established=$_POST['established'];
-
$price=$_POST['price'];
-
$diskspace=$_POST['diskspace'];
-
$bandwidth=$_POST['bandwidth'];
-
$econplan=$_POST['econplan'];
-
$maillists=$_POST['maillists'];
-
$platform=$_POST['platform'];
-
$ssl=$_POST['ssl'];
-
$ecommerce=$_POST['ecommerce'];
-
$reseller=$_POST['reseller'];
-
$dedicated=$_POST['dedicated'];
-
$vps=$_POST['vps'];
-
$affiliate=$_POST['affiliate'];
-
$green=$_POST['green'];
-
$au=$_POST['au'];
-
$ca=$_POST['ca'];
-
$uk=$_POST['uk'];
-
$notes=$_POST['notes'];
-
-
include("dbinfo.inc.php");
-
-
$query="UPDATE webhosts SET hostname='$hostname',url='$url',established='$established',price='$price',diskspace='$diskspace',bandwidth='$bandwidth',econplan='$econplan',maillists='$maillists',platform='$platform',ssl='$ssl',ecommerce='$ecommerce',reseller='$reseller',dedicated='$dedicated',vps='$vps',affiliate='$affiliate',green='$green',au='$au',ca='$ca',uk='$uk',notes='$notes' WHERE hostname='$hostname'";
-
@mysql_select_db($database) or die( "Unable to select database" . mysql_error());
-
mysql_query($query) or die("Unable to update data" . mysql_error());
-
echo "<center><table><tr><td>";
-
echo "<h2>Record Updated</h2>";
-
echo "</td></tr></table></center>";
-
mysql_close();
-
?>
-
6 1908
check your table "webhosts" if it has the column "reseller".
Your code will work on one side and not on the other if the tables "webhosts" are different.
SSL is a reserved word in MySQL, so you cannot use it for a column name. See MySQL 5,0 reserved word
See the approp. documentation for other MySQL versions.
Ronald
Yep. You nailed it. Changed the field name and it works just fine.
Thanks.
I knew I would. Glad it is solved. See you around.
Ronald
SSL is a reserved word in MySQL, so you cannot use it for a column name.
Ronald
I thought about that first, too. But then he wrote "this code works fine on another site". So if it's a reserved word then how was it working "on another site" then? It should also have been crashed there. Maybe different versions?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Subrahmanyam Arya |
last post by:
Dear oracle gurus,
I am unable to get past the error ORA-12154: TNS: could not resolve
service name on my host when using hsodbc to talk to a remote mysql
database. i got from the meta link all the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says
ORA-12154:
SQL> select * from all_catalog@demo;
|
by: Stefan Hinz |
last post by:
Degan,
jumping in to try and solve some problems that look pretty obvious to
me ...
> #options for default service (mysqld2)
> (mysqld2)
It should be , not (mysqld2).
|
by: Dennis Francis B. Tutanes |
last post by:
$B$*@$OC$K$J$C$F$*$j$^$9!#(B
$B%D%?%M%9(B@TSTI$B$G$9!#(B
SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR:
From: dtutanes
To: mysql@lists.mysql.com
Subject:
|
by: Denis Labon |
last post by:
I can't connect to mysql server using the mysql-connector-java-3.0.11.
I was able to run the same program when I was running Suse 9.0 but
since I install Suse 9.1, I can't connect.
The error message is:
java.sql.SQLException: Unable to connect to any hosts due to
exception: java.net.ConnectException: Connection refused
I'm using mysql-standard-4.0.14 and able to get in the mysql server by
typing:
bin/mysql -uroot -ptest
|
by: Pugi! |
last post by:
On a freshly installed Fedora C3 (incl. webserver apache php mysql) i get
the following problem when connecting to mysql through a browser
(phpMyAdmin):
:
#2002 Can't connect to local MySQL server through socket
/var/lib/mysql/mysql.sock
On the website of MySQL this error is mentioned but I found no solution.
In /var/log/messages the following log occurs :
| |
by: jiing |
last post by:
Now let me describe what I have done and my purpose:
Originally, I want to user ports to install phpBB
But I found that phpBB doesn't support mysql 5.x (but the ports
installed mySQL 5.0.0 alpha)
so I deinstall mysql5-server and mysql5-client
And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by
ports
but now , mysql is not workable
|
by: pratchaya |
last post by:
This is my sample error in my MySQL Log
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/en/Using_stack_trace.html and
follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please
do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
|
by: MLH |
last post by:
"The following unexpected error occurred in Sub CopyMySQLbttn_Click,
line #250, CBF on frmVehicleChooserform. 2465: "Can't find the field
'forms' referred to in your expression. You may have misspelled the
field name, or the field may have been renamed or deleted."
The above error is returned when running the following click code.
I don't understand what the error means.
Private Sub CopyMySQLbttn_Click()
On Error GoTo...
|
by: Sindhu Rani |
last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do???
C:\s\source>javac -d ..\classes devtestdrive.java
devtestdrive.java:5: cannot resolve symbol
symbol : class device
location: class devtestdrive
device d1=new tv();
^
devtestdrive.java:5: cannot resolve symbol
symbol : class tv
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |