Page 1 of 1

here i am, yet again....

Posted: Thu Mar 25, 2010 5:40 am
by shadowslash
Here I am yet again, asking the Off-Topic questions that doesn't really have anything to do with rev... Um how can I organize the results from an SQL query into tables? I'm talking about PHP here. For example, I do a query to a database and the results have been returned, how do I organize them into tables so that when outputted to the user's browser it looks organized in such a way as:

Code: Select all

Col 1  |  Col 2  |  Col 3
--------------------------
test1  |  test1  |  test1
--------------------------
test2  |  test2  |  test2
--------------------------
test3  |  test3  |  test3
--------------------------
test4  |  test4  |  test4
--------------------------
test5  |  test5  |  test5
--------------------------
test6  |  test6  |  test6
I hope you can see my point and what I'm tryng to obtain... Thanks for the answers revPeople.. ^^

Re: here i am, yet again....

Posted: Thu Mar 25, 2010 8:05 am
by Mark
Hi Shadowslash,

There's LOTS of example code all around the internet, showing how to create a table in PHP. Here's one: http://qurl.tk/7s

Best,

Mark

Re: here i am, yet again....

Posted: Thu Mar 25, 2010 8:10 am
by shadowslash
I tried Googling around for it too but I couldn't find topic about my specific question, i'm dealing with an Oracle database here and the rest / the most that i can find is MySQL related... -_-

Re: here i am, yet again....

Posted: Thu Mar 25, 2010 8:26 am
by Mark
shadowslash,

Once you know how to get your data out of Oracle and turn it into an array in PHP, the principle is exactly the same as with MySQL.

Best,

Mark

Re: here i am, yet again....

Posted: Sun Mar 28, 2010 6:08 am
by shadowslash
Hi mark,

I'm afraid I'm not well equipped when it comes to PHP. That's why I'm not sure how executing this would be possible? Posting in PHP forums won't help either because either they ignore your post or just tell you to Google about it.

Re: here i am, yet again....

Posted: Sun Mar 28, 2010 9:00 am
by Mark
shadowslash,

That's rather understandable. It doesn't make much sense to answer absolute beginners questions about PHP, because the answers are all over the 'net already. I found this link http://qurl.tk/7z through a search machine. It shows a very simple example of the use of Oracle within PHP.

To learn the basics of PHP, have a look at http://qurl.tk/80 .

Good luck,

Mark