Welcome Guest, Not a member yet? Register   Sign In
[solved!] A Database Error Occurred
#7

[eluser]Dyllon[/eluser]
[quote author="maria clara" date="1263288589"]i have put this:
Code:
$this->db->select("SUM(gross) as sales, SUM(paid) as payment, SUM(credit) as credit, SUM(debit) as debit, SUM(`return`) as `return`");

and it doesn't show the database error log.
but i have this in my console message

Code:
<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  client_id</p>
<p>Filename: models/ccm_receipt_db.php</p>
<p>Line Number: 292</p>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  client_id</p>
<p>Filename: models/ccm_receipt_db.php</p>
<p>Line Number: 299</p>
[/quote]

The error is really self explanatory, your $data array does not contain a key 'client_id' but you're referencing it.

Check your controller, why are you expecting a 'client_id' and why isn't one being supplied? and further more why not add some error checking if there's a possibility the 'client_id' could be missing?


Messages In This Thread
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 08:08 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 08:20 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 08:54 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:18 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:29 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:45 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:46 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:55 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:57 PM
[solved!] A Database Error Occurred - by El Forum - 01-11-2010, 09:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB