bambua
Well-known member
Having a bit of a problem with the following class:
When I load the page I get the following error:
[/SIZE]
Any ideas? I've been banging my head against this for about an hour, I'm a bit new to the MVC thing but very experienced on the PHP end and just can't find where I'm going wrong.
Thanks!
Code:
<?php
class RecentStatus_Model_StatusList
{
public static function getStatusArray() {
$db = XenForo_Application::get('db');
$statusList = $db->fetchAll("SELECT * FROM xf_news_feed WHERE action = 'status' ORDER BY event_date DESC LIMIT 10",10);
return $statusList;
}
}
When I load the page I get the following error:
Code:
Server Error
mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of variables doesn't match number of parameters in prepared statement
XenForo_Application::handlePhpError()
mysqli_stmt->bind_param()
call_user_func_array() in Zend/Db/Statement/Mysqli.php at line 204
Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 312
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 468
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 706
Zend_Db_Adapter_Abstract->fetchAll() in RecentStatus/Model/StatusList.php at line 6
RecentStatus_Model_StatusList::getStatusArray() in RecentStatus/Controller/Public.php at line 10
RecentStatus_Controller_Public->actionIndex() in XenForo/FrontController.php at line 303
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/ss/public_html/dev/forums/index.php at line 15[SIZE=13px]
Any ideas? I've been banging my head against this for about an hour, I'm a bit new to the MVC thing but very experienced on the PHP end and just can't find where I'm going wrong.
Thanks!