PHP Warning and Errors

A place for users and developers of the Xataface to discuss and receive support.

PHP Warning and Errors

Postby cantlep » Thu Jun 03, 2010 3:03 pm

Hiya,

In my apache logs, I'm getting the following:

Code: Select all
PHP Notice:  Undefined index: alias in /var/www/html/public/dataface/Dataface/Table.php on line 2046, referer: http://www.dogbiscuit.org.uk/index.php?-table=BillData&-action=related_records_list&-cursor=1&-skip=0&-limit=30&-mode=list&-recordid=BillData%3FBillDataID%3D16&-relationship=SiteData
PHP Warning:  ucfirst() expects parameter 1 to be string, array given in /var/www/html/public/dataface/Dataface/Table.php on line 2385, referer: http://www.dogbiscuit.org.uk/index.php?-table=BillData&-action=related_records_list&-cursor=1&-skip=0&-limit=30&-mode=list&-recordid=BillData%3FBillDataID%3D16&-relationship=SiteData
PHP Warning:  Illegal offset type in /var/www/html/public/dataface/Dataface/Table.php on line 2047, referer: http://www.dogbiscuit.org.uk/index.php?-table=BillData&-action=related_records_list&-cursor=1&-skip=0&-limit=30&-mode=list&-recordid=BillData%3FBillDataID%3D16&-relationship=SiteData


Because of this line in BillData/BillData.php
Code: Select all
function __sql__(){
        return "select t.*, datediff(t.SupplyPeriodEnd,t.SupplyPeriodStart) as StandingChargeUnits, t.TotalCostExVAT*t.MPAN1LowerVATPerc/(100)*t.LowBillDataVATRates+t.TotalCostExVAT*t.MPAN1HigherVATPerc/(100)*t.HighBillDataVATRates as VAT, t.TotalCostExVAT*t.MPAN1LowerVATPerc/(100)*t.LowBillDataVATRates+t.TotalCostExVAT*t.MPAN1HigherVATPerc/(100)*t.HighBillDataVATRates + t.TotalCostExVAT AS BillTotal from BillData t";
}


Have I made an error with the code? It works as far as I can tell but I guess somewhere, the framework doesn't like it.

Can you shed any light?

Cheers

Paul
cantlep
 
Posts: 172
Joined: Fri Mar 05, 2010 2:14 am

Re: PHP Warning and Errors

Postby shannah » Mon Jun 07, 2010 9:39 am

Currently the SQL parser can't handle in-line arithmetic (e.g. 10*5 or columnname*100)... This is likely what it is objecting to. I was a little surprised when you originally showed your solution that involved this arithmetic when you said that it was working...

that's my best guess right now.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: PHP Warning and Errors

Postby cantlep » Mon Jun 07, 2010 1:54 pm

Hi Steve,

Ah right. I've seen you mention this before. Yeah, the code works fine. The calculations are correct so there're no issues there. I'll just ignore the errors for now :-)

Thanks

Paul
cantlep
 
Posts: 172
Joined: Fri Mar 05, 2010 2:14 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved