473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Printing database output in tabular form

when I try to print a web table containing output from a database, I am
getting more info than I want- -

I would like this to print w'o the array('c', AND I'd like the
control characters to print as HTML control chars.

array('c', '- "In the boom years of 1990-1997 developing countries paid
more in debt service than they received in new assistance."
\\r\\n\\r\\n- "Africa pays out $13.5 billion in debt service every
year." \\r\\n\\r\\n- "Africa spends four times as much on debt
repayment a')
Thanks very much for your assistance.

bests,

-rsr-

Nov 13 '06 #1
5 1474
ronrsr wrote:
when I try to print a web table containing output from a database, I am
getting more info than I want- -

I would like this to print w'o the array('c',
arrays instead of strings? what database is this, and how is that
column defined ?

</F>

Nov 13 '06 #2


On Nov 13, 2:48 pm, Fredrik Lundh <fred...@pythonware.comwrote:
ronrsr wrote:
when I try to print a web table containing output from a database, I am
getting more info than I want- -
I would like this to print w'o the array('c',arrays instead of strings? what database is this, and how is that
column defined ?

</F>

It is a MySQL database - those columns are defined as BLOBs

bests,

-rsr-

Nov 13 '06 #3
In <11**********************@i42g2000cwa.googlegroups .com>, ronrsr wrote:
when I try to print a web table containing output from a database, I am
getting more info than I want- -

I would like this to print w'o the array('c', AND I'd like the
control characters to print as HTML control chars.
Look up the `tostring()` method on `array.array` objects and
`str.replace()` for replacing the line ends by '<br />'.

Ciao,
Marc 'BlackJack' Rintsch
Nov 13 '06 #4
At Monday 13/11/2006 16:40, ronrsr wrote:
>when I try to print a web table containing output from a database, I am
getting more info than I want- -

I would like this to print w'o the array('c', AND I'd like the
control characters to print as HTML control chars.

array('c', '- "In the boom years of 1990-1997 developing countries paid
more in debt service than they received in new assistance."
\\r\\n\\r\\n- "Africa pays out $13.5 billion in debt service every
year." \\r\\n\\r\\n- "Africa spends four times as much on debt
repayment a')
You get an *array* object from the database...? Which database? Is it
stored as a BLOB field or similar?
You could transform it to string using the tostring method, and
decode it to unicode.
--
Gabriel Genellina
Softlab SRL

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ˇgratis!
ˇAbrí tu cuenta ya! - http://correo.yahoo.com.ar
Nov 13 '06 #5
I just changed the database to be a TEXT field, and that took care of
the array() stuff - Now, I'm trying to convert the formatting codes to
html.

thanks for your help.

bests,

r0sr-

Nov 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Frank.Sebesta | last post by:
I have a employees database with a picture that shows on a form with employee information. Similar to the Northwinds sample database. When I print the record, my output is only the data and does...
38
by: Sanders Kaufman | last post by:
I'm converting my table-based layouts to css-positioned divs - but the ONLY reason I'm doing it is because it's *considered* a best practice. I don't really see where anything goes hinky when...
33
by: christophertidy | last post by:
Hi I am new to Python and have recieved this error message when trying to instantiate an object from a class from another file within the same directory and wondered what I have done wrong. I...
1
by: sharan | last post by:
Using the expat parser (http://expat.sourceforge.net/) i have to parse the following xml file and print it on the screen in tabular format using C language. i am getting ouput serially but not in...
1
by: sanjaypillary | last post by:
How do I implement the code 4 printing the data of output form in vb6 n few details about connectivity to the database ?????????
6
by: missimma | last post by:
I'm writting a program that keeps student records. I need to present my outputs in tabular form. My recordsets have got the required data. How do i Tabularize my output then send them to the printer?
0
by: menyki | last post by:
pls i designed a database application using visual basic. i have done the coding for the print incase i want to print out the data. Pls my problem is how to code at design time for the...
1
by: billelev | last post by:
Here is some code that I have adapted slightly. It allows a report to be printed to a specific location. It works by calling SaveReportAsPDF and specifying the access report name, and the root...
4
by: jeet123 | last post by:
hi, i am new to c#. How can i make a form which displays data in a tabular format where the data is retrieved from the database (ms-access) and displayed in that from in table. No matter if the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.