Which is lighter on the server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GhOsTTeCh
    New Member
    • Dec 2008
    • 22

    Which is lighter on the server?

    WHich will be ligter on the server.

    Code:
    SELECT val1, val2, val3, val4, val5 FROM `tblname` WHERE `val4;` = $i
    and thats in a while loop
    befor the while loop thers : $i = 1
    at the end of while loop there is $i++

    if val 3 will equal the same value as $i , is there any positive to leave it in the sql query?
  • altonator
    New Member
    • Jan 2008
    • 15

    #2
    What?

    "if val 3 will equal the same value as $i , is there any positive to leave it in the sql query?"

    I don't understand what you're asking.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Originally posted by GhOsTTeCh
      if val 3 will equal the same value as $i , is there any positive to leave it in the sql query?
      If val3 is equal to $i, then it would also be equal to val4, so there would be no point in having it in the table in the first place.
      You could just take it out and use val4 instead.

      Unless I am not understanding you?

      P.S.
      There is most likely a syntax error in your WHERE clause.
      (The column name ends with a semi-colon, which I doubt it should.)

      Comment

      • GhOsTTeCh
        New Member
        • Dec 2008
        • 22

        #4
        Originally posted by Atli
        There is most likely a syntax error in your WHERE clause.
        (The column name ends with a semi-colon, which I doubt it should.)
        lol dats coz of my beatiful copy and pasting skills mixed with my betiful typing and speeling skillz (sarcastic incase if sum1 didnt realise -_-)

        kk fair enough just wanted to chek , tnx again Atli

        Comment

        Working...