» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 50
2 members and 48 guests
AnnaWonders, FermGlomo
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries
Portatiles - Ofertas en Ordenadores y Portatiles. Increibles Ofertas DELL.

Register Now! Contact Us

About this Page
This is a discussion on Help creating block within the Nuke 6.5 to 6.9 - Blocks forums, part of the PHP-Nuke 6.5 to 6.9 category; Im trying to create a block that will display a rows in another mysql table. I put the code in ...



Go Back   Nukemods Forum » PHP-Nuke 6.5 to 6.9 » Nuke 6.5 to 6.9 - Blocks

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2003, 04:24 PM
Junior Member
 
Join Date: Jun 2003
Posts: 1
Help creating block
Im trying to create a block that will display a rows in another mysql table.

I put the code in but my site turns all messed up with alignment when i do. I get the feeling im not doing it right.

Code:
<?php
$db = mysql_connect("localhost","*****","******") or die("Problem connecting");
mysql_select_db("ladder") or die("Problem selecting database");
$query = "SELECT * FROM ladder_1 ORDER BY games desc";
$result = mysql_query($query) or die ("Query failed");
$numofrows = 10;
?><?php
echo "<TABLE BORDER=\"1\" font color=\"white\">\n";
echo "<TR bgcolor=\"#003366\"> <TD>Zone Nic</TD><TD>Points</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
    $row = mysql_fetch_array($result); 
    if($i % 2) { 
        echo "<TR bgcolor=\"black\">\n";
    } else { 
        echo "<TR bgcolor=\"black\">\n";
    }
    echo "<TD>".$row['name']."</TD><TD>".$row['games']."</TD>\n";
    echo "</TR>\n";
    

}
echo "</TABLE>\n";
?>
thats my code and obviously its wrong


Could someone help me please....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating module aa_sauron Nuke 7.x - General 5 11-30-2006 02:08 PM
Request - Creating a block ... Theberge43 Nuke 7.x - Blocks 0 07-29-2005 02:06 PM
question about creating this block sorn Nuke 7.x - Blocks 3 05-21-2005 08:36 AM
Creating a page. ps2cho Nuke 7.x - General 3 04-10-2005 05:05 PM
need help creating/modifying a block elb0m Nuke 6.5 to 6.9 - Blocks 6 04-17-2003 06:30 AM


All times are GMT -5. The time now is 05:50 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31