Hello
I have this query that get's the data I want, but it duplicates each row over 3000 times.
What I need is these results if it's BOUND and TELCOPEND or CUSTPEND thus the %PEND%.
PHP Code:
SELECT new_udb.lcompanyname, new_udb.username,
new_udb.lpackagecode, bindings.binding_state
FROM new_udb
INNER JOIN bindings ON new_udb.lrouterport=bindings.lrouterport
WHERE new_udb.lacctstatus LIKE '%PEND%' AND bindings.binding_state='BOUND';
This is a sample of what I get:
Quote:
[0] => Array
(
[lcompanyname] => Name1
[username] => username1
[lpackagecode] => 10-15-393
[binding_state] => BOUND
)
...
[3158] => Array
(
[lcompanyname] => Name1
[username] => username1
[lpackagecode] => 10-15-393
[binding_state] => BOUND<
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --