Question about mySQL SELECT query and '*'
#5

Quote:
Originally Posted by MP2
Посмотреть сообщение
But what I'm saying is, if I need 100 fields, if I do

SELECT field1, field2, field3 etc.

it's going to need a massive string. Can't I just do

SELECT * FROM x ...

Then get the fields with the function?
If you don't want to load the data in a specific order or exclude some fields from being loaded, sure you can use * instead of listing field names. However I have switched to listing the fields, it also helps when you're adding a new field or for general database compatibility.
Reply


Messages In This Thread
Question about mySQL SELECT query and '*' - by MP2 - 10.01.2012, 10:42
Re: Question about mySQL SELECT query and '*' - by Vince - 10.01.2012, 11:41
Re: Question about mySQL SELECT query and '*' - by MP2 - 10.01.2012, 13:17
AW: Question about mySQL SELECT query and '*' - by Blowfish - 10.01.2012, 14:34
Re: Question about mySQL SELECT query and '*' - by AndreT - 10.01.2012, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)