Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9059261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:55:47+00:00 2026-06-16T14:55:47+00:00

// Get Id, Streamanbieter und StreamId $sql = mysql_query(SELECT `Id`,`Anbieter`,`StreamId`,`Online` FROM `streams`); // Aktualisiere

  • 0
// Get Id, Streamanbieter und StreamId
$sql = mysql_query("SELECT `Id`,`Anbieter`,`StreamId`,`Online` FROM `streams`");

// Aktualisiere streams
while($row = mysql_fetch_object($sql)) {
    $id              = $row->Id;
    $anbieter        = $row->Anbieter;  
    $streamid        = $row->StreamId;
    $ison            = $row->Online;
    $set_online      = "UPDATE streams Set Online = '1' WHERE Id = $id";
    $set_offline     = "UPDATE streams Set Online = '0' WHERE Id = $id";
    //$set_onlinesince = "UPDATE streams SET Online_since = current_timestamp WHERE Id = $id AND Online_since = '0000-00-00 00:00:00'";
    $viewers         = get_viewers($streamid, $anbieter);
    $update_viewers  = "UPDATE streams Set Viewers = $viewers WHERE Id = $id";
    $set_zero        = "UPDATE streams Set Viewers = 0 WHERE Id = $id";
    $set_datezero    = "UPDATE streams Set Online_since = '0000-00-00 00:00:00' WHERE Id = $id";
    if(get_online($streamid, $anbieter) == true) {
        if($ison == 0) {
            //mysql_query($set_onlinesince);
        }
        mysql_query($set_online);
        mysql_query($update_viewers);   
    }
    else {
        mysql_query($set_offline);
        mysql_query($set_zero);
        mysql_query($set_datezero); 
    }
}

Check out the commented lines $set_onlinesince. I had the problem that mysql_query($set_onlinesince) was executed nearly all the time, so I made the IF clause and added an additional statement in the Where clause. It was executed most of times.
After that I made an echo into the IF clause. When I executed the file it didn’t show the echo output but would execute the mysql_query($set_onlinesince). Then I tried to outcomment the line and it still was executed. When I outcomment the variable with the query and it was still executed after page reload. That does freak me out.
I deleted the cache in my browser several times and also tried it in a different browser. There was no effect.
How can this happen???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:55:48+00:00Added an answer on June 16, 2026 at 2:55 pm

    It could be possible in this scenario that the field is set to ON UPDATE CURRENT_TIMESTAMP, which would update it automatically with one of the previous queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

//get the current member count $sql = (SELECT count(member_id) as total_members from exp_members); $result
//get the messages from the database $messagesID_query = mysql_query(SELECT messageID, posterID, messageTime, message FROM
I get this error while accessing a php script: W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class
Get class from div inside an li and add to the same li. The
get current array position pointer while doing foreach $object->result_array() Hi, consider this, a case.
Get the following error periodically in an IIS application: Failed to load resources from
i get date from xml in this format: 7/16/2010 (mm/dd/yyyy) i have in my
I get the Json from google. it has many details on many things but
// GET: /Product/Delete/5 public ActionResult Delete(int id) { var res = (from r in
get this from my database: 252.587254564 Well i wanna remove the .587254564 and keep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.