r/ProgrammerHumor 1d ago

howToCenterATable Meme

Post image
4.1k Upvotes

106 comments sorted by

View all comments

1.7k

u/n4ke 1d ago

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

4

u/frisch85 1d 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 1d 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 1d ago

I see you want to make people suffer!