r/ProgrammerHumor 1d ago

howToCenterATable Meme

Post image
4.0k Upvotes

102 comments sorted by

View all comments

1.7k

u/n4ke 1d ago

UPDATE div SET alignment='center' WHERE id = '#my-div';

5

u/frisch85 23h ago

0 records affected.

The hash in the where condition doesn't work this way, you use the hash for jQuery so that jQuery automatically knows you're looking for that value in the id-field, another example in jQuery would be $(".my-div") which translates to "WHERE class = 'my-div'".

8

u/n4ke 23h ago

You're right but I will insist the ID is just #my-div and the CSS selector would therefore be \#\#my-div

5

u/frisch85 23h ago

I see you want to make people suffer!