Jump to content

shmideo

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by shmideo

  1. This is what I have so far, but stuck on the date part. <?php//// CONNECT TO THE DATABASE SERVER (use your credentials)//$db = new mysqli(localhost,root,"",jm_db);//// GET THE VALUE TO SEARCH FROM FROM SUBMITTED FORM DATA//$search = isset($_GET['search']) ? $_GET['search'] : '';//// ADD THE WILDCARD CHARACTERS//$sqlSearch = '%'.$search.'%';//// PREPARE AND EXECUTE THE QUERY//$sql = "SELECT calldate, channel , COUNT(*) as total FROM asterisk_cdr WHERE tablefield LIKE '%given string%' GROUP BY calldate"; $stmt = $db->prepare($sql);$stmt
  2. It's a MySQL database running locally, localhost (wamp). I don't have any code yet.
  3. Hi all PHP newbie and first post! I hope someone can help. I have looked at some of the tutorials but still can't get my head around how to get the data from within a PHP script. Trying to create a form with two fields "Date" and "Channel" to look at the 'calldate' and 'channel' columns and then give a count result, so just want to find whatever specified on the form and give the number of ocurrences found grouped by date. Ie, how many ocurrences for specified 'chanel' %CLI/1234567% for a given date. Thanks
×
×
  • Create New...