Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-2006, 06:09 PM
Blaze's Avatar   
Blaze Blaze is offline
Programmer
 
Join Date: Jun 2006
Posts: 117
Rep Power: 9
Blaze is on a distinguished road
Default Two mysql connections

Do I need to create two mySQL connections for this?

PHP Code:
$db mysql_connect($server,$username,$pass);
$query "SELECT * FROM test";

$results mysql_query($query);

while (
$row mysql_fetch_array($results) {
      
$query "SELECT * FROM test2";
       
$results mysql_query($query);

or will this bomb out?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 08-07-2006, 10:55 PM
TkTech TkTech is offline
 
Join Date: Jun 2006
Posts: 990
Last Blog:
Having trouble with yo...
Rep Power: 20
TkTech is on a distinguished road
Send a message via MSN to TkTech
Default

Ehhhh, Dont see what this code is supposed to do, but it wont work with what you have
Code:
$db = mysql_connect($server,$username,$pass);
$query = "SELECT * FROM test";

$results = mysql_query($query);

while ($row = mysql_fetch_array($results)  //<-This $result is getting overwritten by the following
{
      $query = "SELECT * FROM test2";
       $results = mysql_query($query); //<-SO simply change to something else, ie $result2
}
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-11-2006, 07:40 PM
Blaze's Avatar   
Blaze Blaze is offline
Programmer
 
Join Date: Jun 2006
Posts: 117
Rep Power: 9
Blaze is on a distinguished road
Default

Yours won't work either (missing a ) on the while. Thanks for your help. I'll give that a try.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: PHP to MySQL Jordan PHP Tutorials 9 09-05-2008 01:12 PM
MYSQL CheatSheet - A must for MySQL Users reachpradeep Database & Database Programming 1 03-03-2007 04:05 PM
Toad for MySQL Lop Database & Database Programming 0 12-06-2006 12:07 PM
Toad for MySQL 2.0.1 Kernel Software Development Tools 0 10-03-2006 07:03 AM
MySQL Resources dirkfirst Database & Database Programming 1 05-25-2006 03:31 AM


All times are GMT -5. The time now is 05:33 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads