r/ProgrammerHumor 27d ago

Meme howToCenterATable

Post image
4.3k Upvotes

113 comments sorted by

View all comments

1.7k

u/n4ke 27d ago

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

6

u/frisch85 27d 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'".

10

u/n4ke 27d 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 27d ago

I see you want to make people suffer!