WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Invision Forums Latest Threads list
Categories : PHP, Miscellaneous, Databases, MySQL Click here to Update Your Picture
Sarah King
Date : Dec 12th 2003
Grade : 3 of 5 (graded 2 times)
Viewed : 13661
File : 3767.zip
Images : No Images for this code example.
Search : More code by Sarah King
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?php
// ----------
// IBF Latest Topics 2.0 - © Sarah King
// Revision of 1.5 by Chris Mellor
// ----------

function IBFLatestTopic($num)
{
global
$INFO;
// ----------
// Get the config file
//     Change this include statement to reflect the absolute path
// ----------
if (!isset( $INFO)) include '/www/virtual/mysite/htdocs/conf_global.php';
$bullets = '<ol>'; // numbered list
//$bullets = '<ul>'; // bullets

// ----------
// Connect to database
// ----------

$connect = mysql_connect($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass']) or die("Could Not Connect To <b>\"$host\"</b>");
$select = mysql_select_db($INFO['sql_database'], $connect) or die("Could Not Select Database: <b>\"$db_name\"</b>");

$query = mysql_query("SELECT * FROM `{$INFO['sql_tbl_prefix']}topics` ORDER BY `tid` DESC LIMIT 0, $num")
    or die(
"Could Not Execute The Query");
                   
// ----------
// Running A Loop
// ----------
   
$output = $bullets;
       
while(
$ibf = mysql_fetch_array($query))
{

   
$date_posted = date("F j Y, H:i A", $ibf[start_date]); // Date of topic posted
   
$last_posted = date("F j Y, H:i A", $ibf[last_post]); // Date of last post
   
   
$output .= "
    <li>
      <a href=\"
{$INFO['board_url']}/index.php?showtopic={$ibf[tid]}&view=getnewpost\" title=\"Posted: {$date_posted}\">{$ibf[title]}</a>
    (
     
$ibf[posts] Replies |
     
$ibf[views] Views |
      By: <a href=\"
{$INFO['board_url']}/index.php?showuser={$ibf[starter_id]}\" title=\"Last Post: {$last_posted}\">{$ibf[starter_name]}</a>
    </li>
    "
;
}

$output .= '</' . substr($bullets,1);
return
$output;
// ----------
// End Of Script
// ----------

}
?>



bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager
Categories : MySQL, PHP, MySQL, Complete Programs, Databases
This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server.
Categories : Databases, MySQL, Complete Programs, PHP, Databases
Complex paging with no resultset limit
Categories : PHP, MySQL, Databases, Output Control, HTML and PHP
for each record, do this to the first record, and do that to any subsequent record
Categories : PHP, Databases, MySQL, Beginner Guides
Dynamically generated pop-ups (Select items)
Categories : PHP, HTML and PHP, MySQL, Databases
database,php,mysql,demo,example,php3,training,tutorial,codes,code
Categories : Databases, MySQL, PHP, PHP Options and Info
Displaying records of database in more than one page (paging)
Categories : Databases, MySQL, PHP
phpFormGenerator for Dynamic Form Generation from MySQL
Categories : PHP, PHP Classes, MySQL, Databases, HTML and PHP
MySQL Class to ease Database connectivity
Categories : MySQL, PHP Classes, Databases, PHP
Zip code range and distance calculation class v1.0.0
Categories : PHP, Databases, MySQL, Zip Code
This is a very simple BBS that uses MySQL
Categories : MySQL, Databases, Complete Programs, PHP
Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs.
Categories : Databases, PHP, MySQL, Complete Programs
PHP Calendar Web App
Categories : PHP, Databases, MySQL, Date Time, Calendar
Cut your MySQL Connections to 1 line of code
Categories : PHP, Beginner Guides, Databases, MySQL
phpAds, a complete banner and ad management system with detailled tracking and stats.
Categories : MySQL, Complete Programs, Ecommerce, PHP, Databases
 Jacob Smith wrote :1345
good idea but not workin