Results 1 to 3 of 3

Thread: PHP; Error insert

  1. #1
    Join Date
    Jan 2006
    Posts
    3

    PHP; Error insert

    hello!
    i have over 2 hours trying to figure out what's wrong here and yet nothing so if you can see where my mistake is please tell me:
    PHP Code:
    $query 'INSERT INTO BiblioPartidas (ID, Tourn, Ronda, Resultado, WhiteName, WhiteElo, BlackName, BlackElo , Partida) VALUES (\'\', \'$_Tourn\', \'$_Ronda\', \'$_Resultado\', \'$_WhiteName\', \'$_WhiteElo\', \'$_BlackName\', \'$_BlackElo\', \'$_Partida\')';


    mysql_query($query) or die('Error, insert query failed -1'); 
    That is the line generated by phpMyAdmin, I also tried without the \ before the ' but nothing...im in blank here

  2. #2
    Join Date
    Dec 2005
    Posts
    4
    $_xxxxx is this variables?
    php do not parse '-quoted strings. use "-string instead

    PHP Code:
    $query "INSERT INTO BiblioPartidas (ID, Tourn, Ronda, Resultado, WhiteName, WhiteElo, BlackName, BlackElo , Partida) VALUES ('', '$_Tourn', '$_Ronda', '$_Resultado', '$_WhiteName', '$_WhiteElo', '$_BlackName', '$_BlackElo', '$_Partida')"

  3. #3
    Join Date
    Feb 2006
    Posts
    4

    happens

Posting Permissions

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