473,835 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem printing out content of database table

1 New Member
Although I have written some perl ,I have obviously missed something. I have created a database for my local tennis club, which can be updated etc etc. I thought it would be a good idea to for members to view details on line, for contact purposes (more likely to get a team out). So I wrote the code (below). The first record of the database is nicely viewed in the table.However, all other records appear as just one long line of data, outside the table. I am missing something here, and having spent all week trying to correct but to no avail getting totally frustrated. The data is in the hash %name, I need to split this up somehow. Any ideas please.

#!C:/perl/bin/perl

require "formparser.lib ";
&parseform;

%members=("exis ting","membersh ip");

use Win32::ODBC;

$DSN = "Tennis";

my$Database = Win32::ODBC->new($DSN);
if (! $Database){
print "Failed to connect $DSN\n";
Win32::ODBC::Du mpError();
die;
}

$SQL = "Select name,membership _cat,standard,t eam From $members{existi ng}";


if ($Database->Sql($SQL)){
print "Error getting existing info for $members{existi ng}\n";
$Database->DumpError();
}



print "Content-type: text/html\n\n";
print "<HTML><HEAD>\n <TITLE>";
print "Here are all current members";
print "</TITLE>\n</HEAD><BODY>\n";
print "Here are all current members";
print "<table border=1 cellpadding=5>" ;

print "<tr><th align=left>Name <th align=left>Memb ership Category <th align=left>Stan dard <th align left>Team </tr>\n";

while($Database->FetchRow()){
%name = $Database->DataHash;



print "<tr><td>$name{ name}<td>$name{ membership_cat} <td>$name{stand ard}<td>$name{t eam}</tr>\n";

print "</table>";
print "</BODY></HTML>";
}
Nov 16 '06 #1
0 1307

Sign in to post your reply or Sign up for a free account.

Similar topics

16
10444
by: gb | last post by:
Hi All, Ive created a popup page using 'var openWindow = window.open("new","pop")' And added content using openWindow.document.write(" "); statements. But now I would like to be able to print this page? openWindow.document.write("<a href='#' onClick='self.close()'>Close<\/a><\/p>")
7
1687
by: Amirallia | last post by:
Hello! I have a wecontrol table in a page, this table has a number of variable rows depending of the choice of the user. But when the table has a large number of rows, the printing of the page requires 2 pages . The first page is ok, but in the second page of the printing I have no ligne of the row and no ligne of the column printing on the page!
2
3045
by: letsgetsilly | last post by:
I'm developing the external corporate website for my company in Visual Studio 2003 using html, css, and a user web control for the header/navigation. When I try to print any of the pages only the header image (an <img> located in the Web User control) and the footer (also <img>) will print, but none of the text, graphics, background colors, or background images that are included. My page is a liquid 3 column + 1 header + 1 footer CSS...
2
1926
by: gthomas | last post by:
hi, i am having trouble printing the records form my database. each row has a topic and headline. the topic should print and then the headlines for that topic, then the next topic and headlines. healthcare headline1 headline2 sports headline3 headline4 headline5...
0
2008
by: Muhammad Ahsin Saleem | last post by:
Hi EveryBody, I have a master page in asp.net 2.0. I want to create 5 Section of the page 1. Header having width=1004 and height=102 2. Menu on Left side in remaining portion having width=148 and height must be flexible to the values in DataBase 3. Content Place Holder having width=708 and height must be flexible to the values in DataBase
1
4345
by: Trev | last post by:
Hi, I'm hoping that someone in this group can shed some light on an issue I'm having with a Formview. I have a Web User Control (.ascx) with a Formview. The Formview contains 2 Multiviews, one in the EditItemTemplate and one in the InsertItemTemplate. Each of those Multiviews contains several Views, and each view contains several controls such as textboxes, checkboxes etc. Those controls are bound to the Formview's datasource, which...
1
3486
by: laredotornado | last post by:
Hi, I have a data table on my page (buried amidst other images and extraneous text). I would like to spawn a new window that automatically prints the content of my data table, and only that content. The tricky part is the ordering of the table may not be the same as when the page was loaded. I recently discovered the virtues of JQuery and its tablesorter plugin (http://motherrussia.polyester.se/ jquery-plugins/tablesorter/), so it is...
2
1442
by: coldblood22 | last post by:
Well in my Application i am using the java Printable interface to print the GUI. The printing is done fine but once done with the printing my program breaks off with the database file without. Well i haven't made any calls to close the database after printing. But after printing, none of the modules recognize the database file. I manually tried to close and open the database after printing but still it is not able to access the tables. I am...
0
1690
by: gnewsgroup | last post by:
In my asp.net 2.0 web application. I create chart images on the fly by getting the data from the database. These chart images all have fixed width, but the height is dynamic depending on the number of rows in the table returned from the database. These chart images are put into an HTML table through code-behind. They display nicely in either IE or FireFox. But, there is a problem printing them when the chart image is too big to fit...
0
9810
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10526
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6970
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5640
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5808
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.