inserting works fine but I cant update.

2004-06-09 Thread Blake Schroeder
I am having a update problem, I have a table that has 28 columns they 
are name 1-28.  I am able to insert data into the table. When I try to 
update info into the table it does not work. Any ideas?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: inserting works fine but I cant update.

2004-06-09 Thread Dan Nelson
In the last episode (Jun 09), Blake Schroeder said:
 I am having a update problem, I have a table that has 28 columns they 
 are name 1-28.  I am able to insert data into the table. When I try to 
 update info into the table it does not work. Any ideas?

Not until you tell us the error message.

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: inserting works fine but I cant update.

2004-06-09 Thread Blake Schroeder
Sorry
Query
UPDATE table SET 1 = '1' WHERE id = '1'
|#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 '1  =  '1' WHERE id =  '1'' at line 1

-Blake
|
Dan Nelson wrote:
In the last episode (Jun 09), Blake Schroeder said:
 

I am having a update problem, I have a table that has 28 columns they 
are name 1-28.  I am able to insert data into the table. When I try to 
update info into the table it does not work. Any ideas?
   

Not until you tell us the error message.
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: inserting works fine but I cant update.

2004-06-09 Thread Ronan Lucio
 I am having a update problem, I have a table that has 28 columns they
 are name 1-28.  I am able to insert data into the table. When I try to
 update info into the table it does not work. Any ideas?

1) What are the QUERY you´re using to UPDATE datas?
2) What is the error message?
3) What are the version of MySQL you are using?
4) Do you have GRANT privileges to UPDATE data in such table?

Ronan



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: inserting works fine but I cant update.

2004-06-09 Thread Ronan Lucio
Blake,

 Query
 UPDATE table SET 1 = '1' WHERE id = '1'

 |#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 '1  =  '1' WHERE id =  '1'' at line 1

Is the column 1 string type?
If it´s numec type. You should use SET 1=1 instead of SET 1='1'

Ronan



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: inserting works fine but I cant update.

2004-06-09 Thread Blake Schroeder
The type is a varchar.
-Blake
Ronan Lucio wrote:
Blake,
 

Query
UPDATE table SET 1 = '1' WHERE id = '1'
|#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 '1  =  '1' WHERE id =  '1'' at line 1
   

Is the column 1 string type?
If it´s numec type. You should use SET 1=1 instead of SET 1='1'
Ronan

 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: inserting works fine but I cant update.

2004-06-09 Thread Dan Nelson
In the last episode (Jun 09), Blake Schroeder said:
 Query
 UPDATE table SET 1 = '1' WHERE id = '1'
 
 |#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 '1  =  '1' WHERE id =  '1'' at line 1

Mysql is seeing the 1 as a literal number 1.  You can force it to be a
column/table name by putting backtics around it: `1`.  You will
probably be happier if you change the column names to something that
doesn't require special treatment, though, like col1 .. col28.

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: inserting works fine but I cant update.

2004-06-09 Thread Blake Schroeder
Dan
Great suggestion also.
-Blake
Dan Nelson wrote:
In the last episode (Jun 09), Blake Schroeder said:
 

Query
UPDATE table SET 1 = '1' WHERE id = '1'
|#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 '1  =  '1' WHERE id =  '1'' at line 1
   

Mysql is seeing the 1 as a literal number 1.  You can force it to be a
column/table name by putting backtics around it: `1`.  You will
probably be happier if you change the column names to something that
doesn't require special treatment, though, like col1 .. col28.
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]