Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 07:40
oliflorence oliflorence is offline
Registered User
 
Join Date: Aug 2004
Posts: 78
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, 08:33
georgev georgev is offline
SQL Apprentice
 
Join Date: Jan 2007
Location: hiding
Posts: 8,145
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
You only stop learning when you stop asking questions.
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

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