Ultimate CNAM Script bug w/ Asteridex lookup using MySql 5.0.X

tel0p

Guru
Joined
Nov 20, 2007
Messages
195
Reaction score
0
Just wanted to say I love all the hard work everyone has done with this project. Kudos to you all. Uncle Ward is a hero.

the BUG:
On line 397 of cnam.pl (in /var/www/perl/) the SQL statement fails.
This is for the Asteridesk CLID lookup sub-routine (which I should say, rocks.)

Currently the line reads:
Code:
 $dbh->prepare("select * from user1 where out = '$npa$nxx$station'")

MySql doesn't like it. Tailing /var/log/httpd/error_log gives:
Code:
 DBD::mysql::st execute failed: 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 'out FROM user1 WHERE out = '206XXXXXXX''

It should read (aka the fix):
Code:
 $dbh->prepare("select * from user1 where user1.out = '$npa$nxx$station'")
Hope this helps. :eek:
Cheers,
tel0p
 

Members online

Forum statistics

Threads
26,687
Messages
174,410
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top