PHP MYSQL Query Problem?

  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

I seem to have a problem that I can't quite pin down, maybe a fresh pair of eyes will spot it for me :-D

Code: [ Select ]
    $newmin = $min_math[0]*$days*1440 + $min_math[1]*1440 + $min_math[2]*60 + $min_math[3];
    $newapp = $newrow[appearances] + 1;
    $noexist = 0;
    mysql_query("UPDATE `signature` SET `isnow` = '0' AND `appearances` = '" . $newapp . "' AND `minutes` = '" . $newmin . "' WHERE `filename` = '" . $newrow[filename] . "'") OR
        DIE (mysql_error());
    $fin_sql = mysql_query("SELECT * FROM signature WHERE filename = " . $finalize) OR
        DIE (mysql_error());
    $finrow = mysql_fetch_array ($fin_sql);
    mysql_query("REPLACE INTO signature (filename, isnow, date, minutes, appearances) VALUES (" . $finalize .", 1, " . $findate . ", " . $finrow[minutes] . ", " . $finrow[appearances] . ")") OR
                DIE (mysql_error());
    mysql_free_result($fin_sql);
    copy ($finalize . '.jpg' , 'now.jpg');
    echo ("<br><br><br><img src='now.jpg' alt='New Signature'>");
    echo ("<br><br>The New Signature");
  1.     $newmin = $min_math[0]*$days*1440 + $min_math[1]*1440 + $min_math[2]*60 + $min_math[3];
  2.     $newapp = $newrow[appearances] + 1;
  3.     $noexist = 0;
  4.     mysql_query("UPDATE `signature` SET `isnow` = '0' AND `appearances` = '" . $newapp . "' AND `minutes` = '" . $newmin . "' WHERE `filename` = '" . $newrow[filename] . "'") OR
  5.         DIE (mysql_error());
  6.     $fin_sql = mysql_query("SELECT * FROM signature WHERE filename = " . $finalize) OR
  7.         DIE (mysql_error());
  8.     $finrow = mysql_fetch_array ($fin_sql);
  9.     mysql_query("REPLACE INTO signature (filename, isnow, date, minutes, appearances) VALUES (" . $finalize .", 1, " . $findate . ", " . $finrow[minutes] . ", " . $finrow[appearances] . ")") OR
  10.                 DIE (mysql_error());
  11.     mysql_free_result($fin_sql);
  12.     copy ($finalize . '.jpg' , 'now.jpg');
  13.     echo ("<br><br><br><img src='now.jpg' alt='New Signature'>");
  14.     echo ("<br><br>The New Signature");


The problem I think is somewhere in here:

Code: [ Select ]
    mysql_query("REPLACE INTO signature (filename, isnow, date, minutes, appearances) VALUES (" . $finalize .", 1, " . $findate . ", " . $finrow[minutes] . ", " . $finrow[appearances] . ")") OR
                DIE (mysql_error());
  1.     mysql_query("REPLACE INTO signature (filename, isnow, date, minutes, appearances) VALUES (" . $finalize .", 1, " . $findate . ", " . $finrow[minutes] . ", " . $finrow[appearances] . ")") OR
  2.                 DIE (mysql_error());


because the image that is supposed to be displayed after it, isn't displayed, nor is the text. I do not recieve any errors when viewing the page, it is just acting similarly to when you try viewing and html page where you left a ">" off.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • guitrspaz
  • Graduate
  • Graduate
  • guitrspaz
  • Posts: 106
  • Loc: Baltimore, MD

Post 3+ Months Ago

Not enough info...for starters, I usually use UPDATE....WHERE x=x....what happens? errors?
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

hrmmm thought I deleted it, thanks for looking tho, it works fine now. :)

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 111 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.