Jump to content
MakeWebGames

HOSPITAL CRON SUDDENLY STOPS WORKING TOO


dementor

Recommended Posts

Re: HOSPITAL CRON SUDDENLY STOPS WORKING TOO

 

mysql_query("UPDATE users SET hospital = hospital WHERE userid = ".$ir['userid']."");

 

Pointless, and forgetting and variable or two?

And what is it with these spaces?

Also, why do you need to move the cron, in my example it will automatically select that file from the www root.

Link to comment
Share on other sites

Re: HOSPITAL CRON SUDDENLY STOPS WORKING TOO

 

Ah, Missed that, Being awake 15 minute before writing something generally means mistakes will happen, So thanks for pointing that out.

d: I woke up an hour ago, or so i think.

Spaces does't bother me, just asking, I like questions, it's interesting for me to find answers to random questions.

occasionally, I ask a random question to people, and I get either a weird look from them, or a weird answer.

The $c variable is only needed when there is more than one connection present, or when it is used in a class, then you have to declare it and call it.

Take for instance the following scripts.

con.php

<?php

class settings {
 var $connection;
 function cm() {
     $connection = mysql_pconnect('127.0.0.1','root','');
     return $connection; 
  }
}

?>

util.php

<?php

require('con.php');
$sett = new settings();
$c = $sett->cm();
$res_o = mysql_query("SELECT TABLE_NAME FROM ALL_TABLES") ? 'true' : 'false';
$res_t = mysql_query("SELECT TABLE_NAME FROM ALL_TABLES", $c) ? 'true' : 'false';
echo 'Without : ' . $res_o .
  ' - With : ' . $res_t;
?> 

Test it, the output will be the following:

Without : false - With : true

 

But what I actually meant is, the variable you just edited in, calc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...