# From query to array problem

**URL:** https://forum.kirupa.com/t/from-query-to-array-problem/207068
**Category:** Uncategorized
**Created:** [November 14, 2006, 3:34pm UTC](https://forum.kirupa.com/t/from-query-to-array-problem/207068 "2006-11-14T15:34:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sWo0p](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sWo0p](https://forum.kirupa.com/u/sWo0p)
#### Post date: [November 14, 2006, 3:34pm UTC](https://forum.kirupa.com/t/from-query-to-array-problem/207068/1 "2006-11-14T15:34:18Z")

</div>

ej php dudes…

its bin a while() sinds i was back here… bin buzy with tons of stuff… but its good to see most of you still here… 😃

ok i have a problem with my gallery… i made a gallery a few months back (without MYSQL)… now i was working on a update and landed on something i just cant seem to get around…

problem is i have 3 items in my DB… when i request a result i only get 1… insted of all of um :S… now i have a feeling this is cos i use a template system… ({image} in index.tpl) i just cant seem to get around this problem…:krazy:

```php

mysql_connect($db_host, $db_login, $db_pass); 
mysql_select_db($db_name);
		
$result = mysql_query("SELECT * FROM $db_tabel ORDER by id DESC")or die(mysql_error());
		while ($row = mysql_fetch_object($result)){

echo $row->koptekst . "<br />";

$ktekst = $row->koptekst;
}

//* Koppel IMAGECOUNT tag aan template *//
$tpl->assign("IMAGENAME", "$ktekst");

```

here yuh kan see what meen, top section is the echo outside of my template, and in the gray is inside my template…

[http://www.trinitycore.nl/4FO\_FUSv2.0/](http://www.trinitycore.nl/4FO_FUSv2.0/)
