stavros wrote:
I think the correct way to solve this would be to store this and other similar fields as booleans, as the SQL server should evaluate 't', 'true', 'y' and 'yes' to '1'.
I think the path of least resistance for you would be:
Code:
$QUERY = "SELECT count(*) FROM cc_card WHERE (activated='1' OR activated='t') AND credit < $min_credit";
but it would obviously be better to track down where it's being set to a bad value.
I have been trying to get low balance mailed to people. so far I have not been successful. I must be doing something wrong. I got to /tmp I do not see a log for cront_check_account.log and no mail is sent I get a system mail
From
[email protected] Wed Mar 19 06:00:02 2008
Return-Path: <
[email protected]>
Received: from asterisk1.local (localhost [127.0.0.1])
by asterisk1.local (8.13.1/8.13.1) with ESMTP id m2JA01fD019842
for <
[email protected]>; Wed, 19 Mar 2008 06:00:02 -0400
Received: (from asterisk@localhost)
by asterisk1.local (8.13.1/8.13.1/Submit) id m2JA01n0019841;
Wed, 19 Mar 2008 06:00:01 -0400
Date: Wed, 19 Mar 2008 06:00:01 -0400
Message-Id: <
[email protected]>
From:
[email protected] (Cron Daemon)
To:
[email protected]
Subject: Cron <asterisk@asterisk1> php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_check_account.php
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/lib/asterisk>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=asterisk>
X-Cron-Env: <USER=asterisk>
Content-type: text/html
X-Powered-By: PHP/4.3.11
that is all I get from the system is there something wrong with that part
the othere ones work fine only this one has problem.
any help would be appreciated.
thanks