Results 1 to 3 of 3

Thread: fInfo???

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    fInfo???

    Is that a keyword in PHP or something. I just used about 45 minutes to track down an error while I was trying to get out some records from my MySQL database, and I finaly found out that it was tripping on the field called fInfo.

    When I inserted the record, there was no error, but when I was trying to get it again...then hell break lose..

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I don't see how it being a PHP keyword would cause a problem. If it was a MySQL keyword, then it would definitely cause a problem.

    A search of fInfo on mysql.com turns up nothing, so I don't think that's the case.

    Can you post the code that it's crapping on?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    When I did insert the record I used this code:


    Code:
    if (!$Ja){
    	$fDato = addslashes($fDato);
    	$fBy = addslashes($fBy);
    	$fNavn = addslashes($fNavn);
    	$fInfo = addslashes($fInfo);
    	$fSted = addslashes($fSted);
    	$query = mysql_query("INSERT INTO fremover VALUES('', '$fBy', '$fDato', '$fSted', '$fNavn', '$fInfo', '$fBildebox')");
    }
    and it worked....

    then I tried to get it again on a other site. With this code:

    Code:
    <?php
    	$resultat = mysql_query("select fArrID, fSted, fNavn, fInfo, fBildebox from fremover where fBy like 'O' and fDato >= ".$StartDato." ORDER BY fDato",$db);
    	$row = mysql_fetch_array($resultat);
    And it gave me an error.

    Then I found out that it didn't want to make me select the fInfo field. So in myPHPAdimn, I changed the field to fText. And changed line to:

    Code:
    <?php
            $resultat = mysql_query("select fArrID, fSted, fNavn, fText, fBildebox from fremover where fBy like 'O' and fDato >= ".$StartDato." ORDER BY fDato",$db);
    	$row = mysql_fetch_array($resultat);
    and now it worked.

    PS: Of course I then changed the line for the insert form too.


    I used 45 minutes to find out of this. And it nearly killed me.

Posting Permissions

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



Click Here to Expand Forum to Full Width