Jump to content


Click here to lend your support to: Traq and make a donation at pledgie.com !
Photo

Use of mysql's 'SELECT *'


  • Please log in to reply
1 reply to this topic

#1 zeroday

zeroday

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 14 September 2009 - 10:21 PM

I'm using Traq for a small project and was browsing the source and noticed the SQL queries tend to use 'SELECT *', but much of the information gathered from the DB with the statement is discarded. For example, when creating a new component, the new component page executes a query to get project information using 'SELECT *'. However, it ends up only using the project name and id in the new component form.

I think a more efficient way of gathering data would be to specify the exact fields required.

PS. I wanted to browse the Traq 2.0 source in SVN, but couldn't find a way to actually read the file source in the browser (!).

#2 Jack

Jack

    Project Founder

  • Administrators
  • 673 posts
  • LocationAustralia

Posted 23 September 2009 - 12:00 AM

I agree with you on the queries not being very efficient, but with Traq 2.0 I'm makig sure there are no queries like that.

If you want to browse the source for Traq 2.0 you can get an SVN client and checkout the source.

I recommend TortoiseSVN for Windows, and for Mac OS either Versions or Cornerstone.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users