This topic is locked

View of a Table and Pagination

8/17/2006 6:31:42 PM
PHPRunner General questions
S
steviechan83 author

I created a view of a phone number table
select call_id,

company_id,

To_days(max(Date))-to_days(NOW()) as "Last Contacted",

max(Date) as "Last Contacted Date",

Results,

Contact_Person,

companyName,

companyParent,

phoneNum

From call_records_copy a

WHERE company_id <> "0"

GROUP BY company_id
However, for some reason there are pagination problems. It creates empty pages for no reason.
Also, if i try to add search, edit or any other functions then it would generate errors.
Do i need to change anything??
Thanks

S
steviechan83 author 8/17/2006

I think the problem is with the GROUP BY
is there a work around for this?

Alexey admin 8/18/2006

Steve,
PHPRunner doesn't support GROUP BY queries fully.

To get your pages working properly create a View in the database and use this view in PHPRunner.
I.e. run this command on your database:

CREATE VIEW v_phonenumber as

select call_id,

company_id,

To_days(max(Date))-to_days(NOW()) as "Last Contacted",

max(Date) as "Last Contacted Date",

...


Then choose v_phonenumber on the Datasource table tab in PHPRunner.