thanks Vahan<br>
you are right, I have changed 'call t1' for 'calls t1' in balance.php
and invoices.php files and then tried to create a new table named
'calls' but mysql 5 has changed syntax for 'TIMESTAMP DEFAULT' and this
is the error:<br>
<br>
mysql> CREATE TABLE calls (<br>
-> id BIGINT NOT NULL AUTO_INCREMENT,<br>
-> sessionid CHAR(40) NOT NULL,<br>
-> uniqueid CHAR(30) NOT NULL,<br>
-> username CHAR(40) NOT NULL,<br>
-> nasipaddress CHAR(30),<br>
-> starttime TIMESTAMP DEFAULT 'now()' NOT NULL,<br>
-> stoptime TIMESTAMP,<br>
-> sessiontime INT,<br>
-> calledstation CHAR(30),<br>
-> startdelay INT,<br>
-> stopdelay INT,<br>
-> terminatecause CHAR(20),<br>
-> usertariff CHAR(20),<br>
-> calledprovider CHAR(20),<br>
-> calledcountry CHAR(30),<br>
-> calledsub CHAR(20),<br>
-> calledrate float,<br>
-> sessionbill float,<br>
-> destination CHAR(40),<br>
-> id_tariffgroup INT,<br>
-> id_tariffplan INT,<br>
-> id_ratecard INT,<br>
-> id_trunk INT,<br>
-> sipiax INT DEFAULT '0',<br>
-> src CHAR(40),<br>
-> PRIMARY KEY (id)<br>
-> );<br>
ERROR 1067 (42000): Invalid default value for 'starttime'<br>
<br>
<br>
I have to do some research in mysql 5 manual but I prefer to use PostgreSQL :-)<br>
<br>
rafael<br>
<br>
<br><br><div><span class="gmail_quote">On 11/13/05, <b class="gmail_sendername">Vahan Yerkanian</b> <<a href="mailto:vahan@arminco.com">vahan@arminco.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Rafael R. GV wrote:<br>> Hi<br>> I was using a2billing with mysql-4.1.12 and php-5.0.4 very successfully<br>> (thanks to areski for this great project and its invaluable assistance<br>> to solve some issues in my last installation...) now I´ve upgraded mysql
<br>> to last release 5.0.15 and, without changes in 'mya2billing' database I<br>> am able to make calls, create and see created cards, etc, but I get<br>> this errors when invoke CDR´s in both admin or user interfase:
<br>><br>> *Database error:* Invalid SQL: SELECT t1.starttime, t1.src,<br>> t1.calledstation, t1.destination, t1.sessiontime, t1.username,<br>> t1.terminatecause, t1.sipiax, t1.calledrate, t1.sessionbill FROM call t1
<br>> WHERE UNIX_TIMESTAMP(t1.starttime) >= UNIX_TIMESTAMP('2005-11-12') ORDER<br>> BY t1.starttime DESC LIMIT 0,25<br><br>MySQL 5.0.15 introduces stored functions and procedures that are invoked<br>by 'call()'. A2Billing uses 'call' for the name of the cdr table. Find
<br>all occurencies of 'call t1' or ' call ' in A2Billing's sql queries and<br>replace them to 'calls t1' and ' calls '. Don't forget to rename 'call'<br>table to 'calls'. In short, latest A2Billing doesn't work on mysql<br>
5.0.15 / PHP5 out of box.<br><br>On the side note, MySQL doesn't support more than 1 entry with default<br>value of "DEFAULT now() NOT NULL" in one table.<br><br>regards,<br>Vahan<br>_______________________________________________
<br>--Bandwidth and Colocation sponsored by <a href="http://Easynews.com">Easynews.com</a> --<br><br>Asterisk-Users mailing list<br><a href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</a><br><a href="http://lists.digium.com/mailman/listinfo/asterisk-users">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br><br>rrgv