If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Problem showing all records on web pages in MySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-14-07, 06:40
oliflorence oliflorence is offline
Registered User
 
Join Date: Aug 2004
Posts: 96
Problem showing all records on web pages in MySQL

Hello,
I have recently updated to MySQL 5.0 using Navicat to manage and update content.
I have very simple test table with two fields, testid and test, I have 6 records entered.
Using an SQL query SELECT * FROM tbltest all records are returned, if I use the very same query on a web page (ASP) only 1 record is returned, once again the scripting is very simple and I have done it hundreds of time before, can't figure out why.
I have done test with other tables, some show all records, some not, some just part of the records.
Seems like a mistery to me, any idea what the problem could be? could a bug be causing this?
Reply With Quote
  #2 (permalink)  
Old 11-14-07, 07:33
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
To display the results on the webpage you must loop through the resultset and write each and every record separately...

Oh and avoid SELECT * whenever possible!
__________________
George
Twitter | Blog
Reply With Quote
Reply

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On