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

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.

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.

hm. I find that strange. maybe that's for the older version of sql, bc I use double quotes all the time, just bc that's how my sql class handles it, but I'll make sure to correct.

THANKYOU. that must be it! though...I kinda hate that since that's how I organize.

thanks man!

-Josh

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.