Star2Billing / a2billing

A2Billing is a telecom switch and billing system capable of providing and billing a range of telecom products and services to customers such as calling card products, residential and wholesale VoIP termination, DID resale and callback services.
www.asterisk2billing.org
Other
180 stars 175 forks source link

Alarms has not been created #54

Closed ghost closed 8 years ago

ghost commented 11 years ago

One of the table names for alarms is 'maxvalue' which in the latest release of MySQL is a reserved SQL word. Getting SQL syntax error with this name in the SQL command.

areski commented 11 years ago

Thanks for the report, this seems to be from mysql 5.5

ghost commented 11 years ago

Yes. You are right. From mysql 5.5.

Thanks

Leonard

From: Areski Belaid Sent: Monday, May 13, 2013 9:10 AM To: Star2Billing/a2billing Cc: sanjap Subject: Re: [a2billing] Alarms has not been created (#54)

Thanks for the report, this seems to be from mysql 5.5

— Reply to this email directly or view it on GitHub.

pablojmiranda commented 10 years ago

Please any solutions??? Server are in production. This is the reason i'm not upgrade mysql server a2b. Code modification? Thanks

areski commented 10 years ago

You are welcome to provide a patch/fix for this.

pablojmiranda commented 10 years ago

yes, if i fixed,I post the solution. I try and now the score is 3-0. I'm in 0 ;)

Ubunter commented 8 years ago

Hello, We have solved this bug... It's because the alarms table, cc_alarm, has a column called maxvalue and it turns out that maxvalue is a keyword in mysql.

SOLUTION: In ./admin/Public/form_data/FG_var_alarm.inc added backticks around maxvalue in the setup of $HD_Form -> FieldViewElement and $HD_Form -> FieldEditElement

Hope that we're right and correct, as it's working fine now, for us, and it's up to areski and the developers to prove this solution and close this bug.

Regards,

areski commented 8 years ago

patch here: https://github.com/Star2Billing/a2billing/commit/c879be4dd0aa02710800a93e68e6ebf64f85b606

mason-chase commented 8 years ago

In my opinion: The all fields in entire statement should be enclosed with backticks. this will also improve MySQL parsing of any SQL statement.