The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Just as you asked!
Anyway.
Does anyone know about MySQL and displaying the data in a table?
I've got a basic script to display it like this (http://www.phi11ip.com/mysql/display.php) but I want to be able to display it out of the rows and something like it shows at the bottom of the page...
Does anybody know how to do anything like this? If you can give me the general idea of what to do with a small example or a link to one I should be able to modify it and get it working...
Thanks.
http://www.phi11ip.com/mysql/display3.php
Plus, what does ÷ do? ÷÷÷÷÷÷÷÷÷ why can't I do that combination?
\t
There, that.
What does it do?
The max I can get is 255 characters.
I've fixed it now.
Here is the code that I use to display the text.
----
$result = mysql_query( "SELECT * FROM text ORDER BY id DESC LIMIT 7;" )
or die("SELECT Error: ".mysql_error());
# Loop through each row of data.
while ($a_row = mysql_fetch_array($result)) {
PRINT STUFF
----
This is the main part of it, I've found that I need to use this $text = nl2br($text) to get it to show line breaks correctly.
I know I've gotta change the variables (to something) but I don't know where to put it, or do I have to put it in when I submit the data?
Thanks.
If so, try:
print " ".nl2br($a_row[a_field_name])." \n";
or:
print "";
print nl2br($a_row[a_field_name]);
print "\n";
It's always really really easy, and I can never work it out!
I really do.
:cp
> It's always really really easy, and I can never work it out!
Its only easy when you know how. You can't expect to know everything though, can you?
Have you got it all working as intended yet?
Thanks.
Now I can try and use this to, well, do some other thing that I've got in mind.
I know how to do it, just not how. If that makes sense!