Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Need help interpreting a mySQL function please

  1. #11
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    Thanks... I need a lot of help haha

  2. #12
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Wait, can I ask you one more question... I'll ask you anyways.
    You said that you saw the @ on a site, which site exactly?
    Jeremy | jfein.net

  3. #13
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    I'll tell you privately, if you tell me why you want to know. I didn't see it "on a site." I saw it in the code for a site I was working on. I have no desire to insult or embarrass anyone. I got stuck cleaning up the mess this guy made so he is not my favorite person and that's why I referred to it as sloppy code.

    I just dug out one of those files at random and sure enough that "@" sign is on every single query. Here is a chunk of the code and in 15 lines he used it 3 times. I had never laid eyes on php before so had no reason to question what he did. This is how I learned the little I know about php - by cleaning up his code. It's a case of the blind leading the blind, I'm afraid.

    Code:
    $sql = "SELECT MAX(Cust_No) FROM $table_cus";
    $result1 = @mysql_query($sql,$connection) or die("Couldn't execute $sql query.");
    $Cust_Num = mysql_result($result1, 0, 0)+1;
    
    // Get Order Number
    
    $sql = "SELECT MAX(Order_No) FROM $table_ord";
    $result2 = @mysql_query($sql,$connection) or die("Couldn't execute $sql query.");
    $Order_Num = mysql_result($result2, 0, 0)+1;
    
    // Count Activities in Cart
    
    $sql = "SELECT COUNT(Cust_ID) FROM $table_car WHERE Cust_ID = '$Cust_ID'";
    $result = @mysql_query($sql,$connection) or die("Couldn't execute $sql query.");
    $Max_Item = mysql_result($result, 0, 0);

  4. #14
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ok, I was just wondering.
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •