Re: POSTing to XML...



transpar3nt wrote:
Hello, I am building a small app for the electronics store I work for
that allows employees to enter product information and it outputs a
printable sales estimate for the customer. I have it working
flawlessly, except that since I am using a MySQL database to store the
input info, I am limited by the number of rows in the db table (20
sets of each field type = 20 item rows on the printout).

I am looking to pursue an XML approach which would allow me unlimited
number of items (each item has a description, qty, price, etc.). When
the user needs to add an item they simply click "add item" and
JavaScript populates another set of form fields meant for another
<item> element. Unfortunately, since POST only accepts unique names
for each field I can't seem to figure out how to produce the xml so
each section of fields produces one item element and several
subelements.

How would I tell the script that I am grouping each of the item fields
(itemDesc1, itemPrice1, itemQty1, etc) together and to separate them
from (itemDesc2, etc.)?

I hope I'm clear about this, I am brand new to working with XML (oh
I'm using the DOM in PHP to produce the XML).

Thanks for any advice you may give.

- Keith


There is no such limit in MySQL. And a database is the way to go - not XML.

But this is a bad design, anyway. Read up on database normalization, and if you're still having trouble with your database design try comp.databases.mysql.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: DISCOVER_XML_METADATA
    ... expansion of ASSL XML returned by the server. ... You could do ExpandObject for the server in step 1. ... you could request ExpandObject for that database -- this is step ... all cubes and nothing else. ...
    (microsoft.public.sqlserver.olap)
  • Re: Preservation of namespace prefixes in XML datatype
    ... representation well beyond merely preserving the logical meaning. ... > Now the ANSI/ISO SQL-2003 standard makes it pretty clear that the XML ... all the guarantee the database gives you is that we preserve the ... >> makes changes in namespace prefixes, will I the user/developer have the ...
    (microsoft.public.sqlserver.xml)
  • Re: Wanted:MAIL.MAI structure definition
    ... a relational database is more flexible in the retrival of data. ... Perhaps this impact has been softened as hardware has gotten faster, but, overhead is overhead, and if you weren't using the advances in hardware for overhead, those designs that have less overhead would also gain from the faster hardware. ... RFC822 header because your XML parser wouldn't be able to understand new ...
    (comp.os.vms)
  • Re: Rework [Was: Static vs. Dynamic typing...]
    ... Agile projects have an extraordinarily low chance of a big change. ... Suppose you start with XML files, and by Iteration 6 the ... Switching to a database is now cheaper than morphing XML files into a ...
    (comp.programming)
  • Re: Data source options
    ... > customer to access the app and own the data. ... and by keeping the "main database" closer to the "web application ... I've been watching the "maturation" of the XML space. ... Visage ISN'T free - but it is cheap as chips ...
    (comp.databases.pick)