daloradius
daloradius copied to clipboard
Can't assign plan in existing user
when I assign plan to user, always error
Database error
Error Message: DB Error: syntax error
Debug info: UPDATE userbillinfo SET contactperson='', planname='1GB-per-week', company='', email='', phone='', paymentmethod='', cash='', creditcardname='', creditcardnumber='', creditcardverification='', creditcardtype='', creditcardexp='', address='', city='', state='', country='', zip='', notes='', changeuserbillinfo='0', lead='', coupon='', ordertaker='', billstatus='', nextinvoicedue='0', billdue='0', postalinvoice='', faxinvoice='', emailinvoice='', updatedate='2020-08-15 19:28:46', updateby='administrator' WHERE username='bagus' [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lead='', coupon='', ordertaker='', billstatus='', nextinvoicedue='0', billdue='0' at line 1]
check video from attachment (inside zip) Kazam_screencast_00024.zip
Same as #185 and #188.
Hi @baguswahyu.
Please, check if the following SQL query solves the issue:
ALTER TABLE `userbillinfo`
CHANGE COLUMN `lastbill` `lastbill` DATE NULL DEFAULT NULL AFTER `billstatus`,
CHANGE COLUMN `nextbill` `nextbill` DATE NULL DEFAULT NULL AFTER `lastbill`;
Hi,
I believe I have the same issue. Any update to 'userbillinfo' results in a 1064 syntax error near 'lead='',coupon''...
The issue occurs for me in daloradius in Edit User (mng-edit.php) when selecting a plan, or updating Billing Info. Interestingly, if I add a new user (mng-new.php) including billing info, it works fine.
Its like the 'lead' field is locked but I think the list values is only via the web page (mng-edit.php, values -->Internet, Friend-Referal, News Medium, Advertisement). The daloradius sql template does'nt show anything strange. Manual sql update works if I leave out the 'lead' field. Insert values manually always fails.
Am surprised others have not had similar issues? (if it is a db issue) Your slq column change above did not work for me. Also I cant play "Kazam_screencast_00024.mp4 message.
Luckily I dont need the billing info but updating the user plan would be handy.
Running version 1.1-3 BETA / 06 Dec 2019 on fedora-31, Mysql 8.0.22
Hi @kpteahan.
After you did apply the mentioned ALTERs, did you created a user and then update it?
I mean maybe the issue stills in old records but not in new records after the apply of SQL ALTERs.
Could you test it please?
yes, I purged the data in the database. Not sure if I did that after.It is working, I can now select a plan without issues.Still getting an error when updating billing info, but now I can apply plans.Will test my manual scripts again to check it. Note that changing the columns I had to change lastbill, nextbill, creationdate and updatedate, otherwise I got invalid values (error1067).
tks
----- Original Message ----- From: "lirantal/daloradius" To:"lirantal/daloradius" Cc:"kpteahan" , "Mention" Sent:Mon, 01 Mar 2021 23:13:55 -0800 Subject:Re: [lirantal/daloradius] Can't assign plan in existing user (#179)
Hi @kpteahan [1].
After you did apply the mentioned ALTERs, did you created a user and
then update it?
I mean maybe the issue stills in old records but not in new records
after the apply of SQL ALTERs.
Could you test it please?
—
You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or unsubscribe [3]
Links:
[1] https://github.com/kpteahan [2] https://github.com/lirantal/daloradius/issues/179#issuecomment-788675796 [3] https://github.com/notifications/unsubscribe-auth/ARNUCFFHTBAJWOI2OZENBOLTBSF3HANCNFSM4QAHKQYQ
Hi MiguelVis, i just have installed the application and have assign plan issue too, I´did apply the ALTERs and still have the same error message in new record. Like kpteahan said, It was necesary to ALTER creeationdate and updatedate, Any idea?