Originally posted by: Hyperblaze
Originally posted by: troytime
Originally posted by: Hyperblaze
spaces.
in quanta I have an option to turn tabs into spaces.
by the way, what's your feedback on my sql example?
by the backticks, it looks like you copied it from phpmyadmin
using select * is ok as long as that user table doesn't have a ton of columns
i usually put the column name in the select though
its hard to get picky on simple queries
In my opinion, select * is never ok.
the main reason: What if later on in life some folks end up adding more columns in the user table for some reason? Do you REALLY want EVERYTHING to be selected when trying to take a few pieces of information? Talk about a waste of mysql load.
Let's say you end up adding 10 new fields in the user table 4 month later (let's say you moved on from the project and someone else is coding at that point).
some text field carrying massive amounts of information. You REALLY want the statement to do a SELECT *?
And to answer your statement. No I did not copy it from phpmyadmin. The way I typed it out was clean and concise. Very easy to read. I do not want to spent more time then I have to reading and understanding the statement.
Edit: I should also mention, I'm freaking anal about how I type code. If it doesn't look clean, it is not acceptable