php - Get the current url in a mysql query -


how can full curent url wether https or https in mysql query below ?

and `url` = 'http://.$_server['http_host'].$_server['request_uri'];' 

as above part not work

complete string , want add @ end , :

$query = $this->db->query("select * " . db_prefix . "customer_online `customer_id` != '0' , date_added > date_sub(current_timestamp, interval 1 hour) "); 

public function getregisteredusersonline(){   $url = "http".(!empty($_server['https'])?"s":"")."//".         $_server['http_host'].$_server['request_uri'];     $query = $this->db->prepare("select count(*) `num` " . db_prefix . "customer_online customer_id != '0' , `date_added` > date_sub(current_timestamp, interval 1 hour)     , `url` = ?");    $query->execute( array( $url ) );    $count = $query->fetch(2);    return $count['num'];  } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -