| | |
simple mysql question/problem
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Aug 2009
Posts: 3
Reputation:
Solved Threads: 0
Hi people,
I have run across this website many times, with the first impression that it was a website to ask a guy named 'Dani' questions about code *snicker*.
I haven't introduced myself. Maybe I will. But I have a question.
In building a program, I'm running mysql code. In a certain instance that's not foreign to the others, I try to update an id of a row where the id is set to something. (UPDATE page2module SET id = "0" WHERE id = "13")
it simply won't work. Can I not change the same field in which I get the row from?
I'm confused.
Help is appreciated,
-Josh
I have run across this website many times, with the first impression that it was a website to ask a guy named 'Dani' questions about code *snicker*.
I haven't introduced myself. Maybe I will. But I have a question.
In building a program, I'm running mysql code. In a certain instance that's not foreign to the others, I try to update an id of a row where the id is set to something. (UPDATE page2module SET id = "0" WHERE id = "13")
it simply won't work. Can I not change the same field in which I get the row from?
I'm confused.
Help is appreciated,
-Josh
Yes, you can, but mysql won't accept the double quotes. If the id field is an integer, you can remove them. If it is a string field, use single quotes instead.
There may be an issue when the id field is an auto-increment field. I think you're not allowed to update it, if it is.
There may be an issue when the id field is an auto-increment field. I think you're not allowed to update it, if it is.
"If it is NOT source, it is NOT software."
-- NASA
-- NASA
•
•
Join Date: Aug 2009
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
Yes, you can, but mysql won't accept the double quotes. If the id field is an integer, you can remove them. If it is a string field, use single quotes instead.
There may be an issue when the id field is an auto-increment field. I think you're not allowed to update it, if it is.
THANKYOU. that must be it! though...I kinda hate that since that's how I organize.
thanks man!
-Josh
![]() |
Similar Threads
- Simple Winsock Question? (C++)
- mysql Installation Problem (MySQL)
- simple mysql question..plz answer :) (PHP)
Other Threads in the MySQL Forum
- Previous Thread: uheight table
- Next Thread: Decimal data type problem
| Thread Tools | Search this Thread |
Tag cloud for MySQL
"use" 1 amazon api aws bizspark breathalyzer changingprices cmg communityjournalism contentmanagement contractors copyright count court crm data database design developer development distinct drupal dui ec2 eliminate email eudora facebook form foss gartner gnu government gpl groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier journalism keyword keywords kickfire laptop law legal license licensing linux managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqlindex mysqlinternalqueries mysqlsearch news opendatabasealliance opengovernment opensource operand oracle pdf penelope php priceupdating query referencedesign remove reorderingcolumns results resultset search select simpledb sourcecode spotify sql statement sugarcrm syntax techsupport thunderbird transparency update virtualization





