Initiate Mage
- Joined
- Feb 8, 2009
- Messages
- 4
- Reaction score
- 0
Hey guys, im just working on making bcstorm compatable with my custom database
i keep on getting this really unexpected error
" Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in. . . "
My code is:
Please help me get this working![Frown :( :(](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f641.png)
i keep on getting this really unexpected error
" Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in. . . "
My code is:
Code:
final public function getPageHome()
{
global $template, $engine;
$a = 1;
$data = mysql_query("SELECT title, id, published, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5");
while($news = mysql_fetch_array($data, MYSQL_ASSOC)) // this is where the error is ..
{
$template->setParams('newsTitle-' . $a, $news['title']);
$template->setParams('newsID-' . $a, $news['id']);
$template->setParams('newsDate-' . $a, date("d-m-y", $news['published']));
$template->setParams('newsCaption-' . $a, $news['shortstory']);
$template->setParams('newsIMG-' . $a, $news['image']);
$a++;
Please help me get this working
![Frown :( :(](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f641.png)