Jump to content

PHP and the MySQL function_concat


denoteone

Recommended Posts

I am trying to add the data stored in a php variable to a MySQL database field that already has data in it. there will be two other PHP variables that need to match two other fields in the data base so that we know which field is the 3rd to update.

 

so Far I have

 

$day = date("d");
$ip = $_SERVER['REMOTE_ADDR'];
$visitor_page = curPageURL();  //function that gets the page they are visiting.
mysql_select_db($database_visitors, $visitors);

    $sql = concat(pages,'$visitor_page') WHERE visitor_ip and visitor_date are = to $ip and $day;

$result = mysql_query($sql) or trigger_error(mysql_error(),E_USER_ERROR);

 

I am having issues with the sql statement

 

Link to comment
https://forums.phpfreaks.com/topic/152174-php-and-the-mysql-function_concat/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.