# Retrieving several rows from a database (PHP)

**URL:** <https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505>\
**Category:** flash\
**Created:** [August 14, 2003, 1:30pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505 "2003-08-14T13:30:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicoVB](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@NicoVB](https://forum.kirupa.com/u/NicoVB)\
**Post date:** [August 14, 2003, 1:30pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/1 "2003-08-14T13:30:28Z")

</div>

I have a database in MySQL and I have PHP. I can write a script in PHP that retrieves several rows from a database (like when I search in a Title column to ‘Red Knight’).

How do you show the results (several rows with several information like the ISBN and the author of the book) in flash???

(When I click on the name of the right book I want to look at in detail, I want to go to a detail page(this is not so difficult), but there must be a link(so ID should be stored))

Do you have to create several dynamic TEXTfields to give the user a ‘table’ of results???

Thanks

Nico

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2003, 2:46pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/2 "2003-08-14T14:46:48Z")

</div>

This tutorial shows you how to send and recieve information from Flash:

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604)

use the same priniciple, just subsistute the flat file for the database…

this could help too: [http://www.kirupa.com/developer/actionscript/flash\_php\_mysql.htm](http://www.kirupa.com/developer/actionscript/flash_php_mysql.htm)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2003, 6:54pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/3 "2003-08-14T18:54:53Z")

</div>

Yep, thank you,

I know how I can do that, but my real problem is this:

What is the best manner to receive multiple rows from a database and then setting them in a TABLE like look.

(see also first post)

Thanks

Nico

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2003, 7:12pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/4 "2003-08-14T19:12:51Z")

</div>

oh for that you would have to set up your textboxes to look like a table. There is no way to pull a table into Flash…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2003, 7:20pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/5 "2003-08-14T19:20:03Z")

</div>

So I have to work with several DYNAMICALLY created textboxes??

is that right??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2003, 7:32pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/6 "2003-08-14T19:32:42Z")

</div>

they dont’ need to be dynamically create, but that would be the best way to go

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2003, 9:05pm UTC](https://forum.kirupa.com/t/retrieving-several-rows-from-a-database-php/28505/7 "2003-08-14T21:05:08Z")

</div>

Depends if you have the same n° of txtboxes for each book, if so, just add them to layout, if no, maybe better with “createTextfield” or whatever the exact syntax was…  
as for sending multiple rows to flash, id use loadVars so you get all the result into one object, and a loop in php to add a counter var to the output (book1ID=x&book1ISBN=xx&book2ID=…);  
for the display in flash you could also use macromedias datagrid component ( [http://www.macromedia.com/software/drk/productinfo/product\_overview/volume1/flash\_components.html](http://www.macromedia.com/software/drk/productinfo/product_overview/volume1/flash_components.html) ) or a free version called something like tkcDatagrid, [http://www.flashcomponents.net/component.cfm?nav=2&id=135](http://www.flashcomponents.net/component.cfm?nav=2&id=135)
