[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Almost got a nested SQL loop working
****** message to minivend-users from Dan Busarow <dan@dpcsys.com> ******
On Mon, 27 Dec 1999, Karl Swisher wrote:
> Hello,
> What I have is a read and a write SQL loop inside of a read SQL loop.
> I have all of the below code working but only at different times and not
> providing full output all the time. I'm modifying the rectipt.html page inside
> of etc. I am writting the order to an external SQL table. Using interpolate=1
[ ... ]
> First inside SQL loop, second read SQL loop
> [sql type=list query="select max(transdetailno) from newtransdetail_tbl"]
> [set name='newnumber' interpolate=1][calc][sql-param transdetailno]+1[/calc][/set]
> [/sql]
Instead of maintaining the transaction # your self make that column
auto_increment (mysql) or serial (pgsql, Oracle?)
Then you won't need the 1st inner loop.
Dan
--
Dan Busarow 949 443 4172
Dana Point Communications, Inc. dan@dpcsys.com
Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list