denoteone Posted April 2, 2009 Share Posted April 2, 2009 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 More sharing options...
denoteone Posted April 2, 2009 Author Share Posted April 2, 2009 I think it is $sql = concat(pages,'$visitor_page') WHERE visitor_ip = '$ip' AND visitor_date = '$day'; I will test tomorrow. Link to comment https://forums.phpfreaks.com/topic/152174-php-and-the-mysql-function_concat/#findComment-799187 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.