127 replies
« Older Comments
    • Mike
      Mike says:

      Sometimes it just takes some time to answer your question. To include hyperlinks in your email, just change the query.

      $query = “Select fname as \”First Name\”, lname as \”Last Name\”,’Google‘ as URL from USER_TABLE”;

  1. Julian Young
    Julian Young says:

    Hey Mike! Wow I didn’t get time to research and reply but glad you resolved this and thanks so much for sharing :) Really good to know that!

    • Julian Young
      Julian Young says:

      Hi Drew, the site operates an automated electronic delivery system. I am not sure what went wrong in this case. I’ve dropped you a wee reply via paypal and refunded your order in full for the time being.

      • Drew
        Drew says:

        Thank you Julian, good to speak to you today, and thank you very much for your swift response. I have forwarded you the automated ticket response I received when mailing your support for your reference.

  2. Andy
    Andy says:

    Hi, Great script is it possiable to add today date in the subject?
    i have added
    $date = date(‘l d F Y’);
    $subject = ‘Porting Report for – $date’;

    but in the email it does not display as the date?

  3. Julian Young
    Julian Young says:

    Hi Andy,

    That is weird regarding the date. I can’t immediately spot anything wrong with that code. Maybe try an alternative syntax and date to test such as…

    $myDate = date(‘l’);
    $subject = ‘Porting Report for – ‘.$myDate;

    //whereby I am just printing the day of the week and appending the date to the string.

    in regards to appending to reports into a single email, you would do something like this.

    //generate two reports with whatever data you want passed in
    $report1 = generateReport($query1, $header, $footer, $color);
    $report2 = generateReport($query2, $header, $footer, $color);

    //join the two reports into one
    $finalReport = $report1.$report2;

    //send the report!

  4. Mahsa
    Mahsa says:

    The script seems interesting. I’d like to know if CRON is ready to be used, or do I have to figure it out myself?
    I don’t want to get stock with the CRON job, since this is the sole reason I’m considering purchasing the script.


  5. Allison Smith
    Allison Smith says:

    I have a column in the report I am generating that is a date. What is the best way to change your email reporter code to format the date in M d Y. I am new to mysql and php so I am not 100% positive how to accomplish this. Same would go for a time field.

    Thank you.


    • admin
      admin says:

      Hi Allison,

      The script deliberately does no formatting on data types, the reason being that I wanted it to be as open as possible and data formatting could open a can of worms. So the solution is to format the date in your SQL query.

      Take a wee peek here -> http://www.w3schools.com/sql/func_date_format.asp

      As an example, here is the query that comes pre-entered in the report.php, we’ll alter this to include a date.

      $query = 'SELECT firstName AS "First Name", loginDate AS "Login Date" FROM userinfo ORDER BY loginDate DESC';

      So we now want to format loginDate with d M Y, here’s how…

      $query = 'SELECT firstName AS "First Name", DATE_FORMAT(loginDate,"%m/%d/%Y") AS "Login Date" FROM userinfo ORDER BY loginDate DESC';

      Does that help? Careful with your speech marks inside the query. Let me know how you get on.

  6. Suraj
    Suraj says:

    Hello Julian,
    Would like to know whether there is any difference between commercial license and personal license.
    Thank you.

  7. David
    David says:

    Hi Julian,

    Is it possible to receive via email only today records or weekly records etc according to date field?

    Thank you!

    • Julian Young
      Julian Young says:

      Yes it is, in your mysql query you need to use a date comparison, for example, one might get only today’s posts from wordpress using

      $query = ‘SELECT * FROM `wp_posts` WHERE DATE(post_date) = CURRENT_DATE order by id desc’;

      Hope this helps!

  8. Arjan
    Arjan says:

    Hi Julian Young,

    we are running on a PHP 5.6 and PHP 7 environment.
    Can you let me know if it is compliant/ compatible with that (PDO etc)


    • Julian Young
      Julian Young says:

      Hi Arjan,

      Yes indeed! Version 4 will be made public at the end of the month assuming the current testing phase works out well. We have a small £4.99 upgrade fee for anyone that bought in the past year. Anyone that bought in the past six months will be upgraded for free. CSV / PDF attachments, PDO DB connections and plenty of other tweaks.

      Best wishes,


  9. Nathan
    Nathan says:

    Hi Julian – just a suggestion – it would be great to have an online change log to see changes on versions and to see the current version. I am on Version: 4.4…is there a new version?

    • Julian Young
      Julian Young says:

      Hi Nathan,

      Totally agree, 4.6 due out shortly, I’m moving everything over to my company jellyhound.co.uk and I will make sure your suggestion is incorporated! Thanks!

  10. Steve Bardocz
    Steve Bardocz says:

    if I use this, I can get it to at least load:
    $query = ‘SELECT NOW() AS “DATE”‘;

    If I use this (calling a stored procedure), I get an HTTP ERROR 500
    $query = ‘call report_ticket_summary(‘2017-03-01 00:00:00’, ‘2017-03-30 11:59:59′)’;

    Now if I use this, it seems to work so I am guessing it has something to do with the single quotes:
    $query = ‘call report_ticket_summary(NULL,NULL)’;

    So when I do adjust it to this:
    $query = ‘call report_ticket_summary(\’2017-03-01 00:00:00\’, \’2017-03-30 11:59:59\’)’;

    I end up getting this error:
    Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /var/www/kayako_fusion/reports/sqlreporter.php on line 110 Warning: array_keys() expects parameter 1 to be array, null given in /var/www/kayako_fusion/reports/sqlreporter.php on line 110

    Once I get this to work, I plan to pass in parameters that I’ll send to the PHP script or generate inside the PHP.

    My other issue is that I get this error as well so I’m not even getting the e-mail:
    Could not instantiate mail function. The mail to stevebardocz@savance.com failed to send.

    How do I troubleshoot that?

« Older Comments

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *