OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Mysql multiple connections pointers
This page's ID:
27958
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Same way... I'm using new constants defined on the same page and a new function:[code]function showGames() { $appDB = mysql_connect(APP_DB_SERVER, APP_DB_USER, APP_DB_PASS); mysql_select_db(APP_DB_NAME, $appDB) or die("Unable to select DATABASE!"); $query = "SELECT * FROM " . TBL_GAMES . " ORDER BY 'id' DESC"; $result = mysql_query($query, $appDB); $num = mysql_numrows($result); if ($num == 0) { echo '<div><b>There are no new games at this time</b></div>'; } else { echo '<ul>'; for ($i = 0; $i < $num; $i++) { $title = mysql_result($result, $i, "title"); $description = mysql_result($result, $i, "description"); $price = mysql_result($result, $i, "price"); echo '<li><a href="index.php">' . $title . ' (' . $price . ')</a><br />' . $description . '</li>'; } echo '</ul>'; } mysql_close($appDB); }[/code] [img]http://www.sangfroidscarecrow.com/sig_western.gif[/img]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail