473,396 Members | 1,816 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,396 software developers and data experts.

Deleting rows using PyDO from SkunkWeb

Hello group.
Could someone descripe how to delete many row at one time
from MySQL database using SkunkWeb PyDO pacgage ??
Documentation is very short about that ...
Assume that Base is class define like in PyDO doc, so
Base.new(...) adds new row..
Documetation show ony delete() without any arguments.
SQL query is like "DELETE FROM SESSIONS WHERE acc_time < '398984353'"

Thanks for read this :-)

--
Marcin Jurczuk, NIC-HDL: MJ1679-RIPE
Jul 18 '05 #1
2 1625
Marcin Jurczuk <mj*******@tkb.pl> wrote in message news:<cg*********@korweta.task.gda.pl>...
Hello group.
Could someone descripe how to delete many row at one time
from MySQL database using SkunkWeb PyDO pacgage ??
Documentation is very short about that ...
Assume that Base is class define like in PyDO doc, so
Base.new(...) adds new row..
Documetation show ony delete() without any arguments.
SQL query is like "DELETE FROM SESSIONS WHERE acc_time < '398984353'"


I just came across this by accident; PyDO questions are better asked
on the skunkweb mailing list.

But to answer it quickly -- the delete() method deletes a particular
instance (one row). If you want delete a range of rows with a single
SQL statement, the best way is simply to use SQL, accessing the
underlying db connection:

c=Sessions.getDBI().conn.cursor()
c.execute("DELETE FROM SESSIONS WHERE acc_time < '333333'")
# this is equivalent to Sessions.getDBI().conn.commit()
Sessions.commit()

Hope that helps,

Jacob Smullyan
Jul 18 '05 #2
On 2004-09-07, Jacob Smullyan <sm******@gmail.com> wrote:
Marcin Jurczuk <mj*******@tkb.pl> wrote in message news:<cg*********@korweta.task.gda.pl>...

But to answer it quickly -- the delete() method deletes a particular
instance (one row). If you want delete a range of rows with a single
SQL statement, the best way is simply to use SQL, accessing the
underlying db connection:

c=Sessions.getDBI().conn.cursor()
c.execute("DELETE FROM SESSIONS WHERE acc_time < '333333'")
# this is equivalent to Sessions.getDBI().conn.commit()
Sessions.commit()

Hope that helps,

Jacob Smullyan

Thx - I've wrote my own class to access SQL because it was faster than
searching answer for PyDO.
Next time will help :)
--
Marcin Jurczuk, NIC-HDL: MJ1679-RIPE
Jul 18 '05 #3

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

Similar topics

5
by: Mojtaba Faridzad | last post by:
Hi, with SetDataBinding( ) a DataGrid shows a DataView. user can select some rows in the grid by holding cotrol key. when user clicks on Delete button, I should delete all selected rows. I am...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following. I'm trying to delete all the rows in a dataview. There are 200 rows. Everything works fine until I delete half way through and then I'm...
4
by: Jim Michaels | last post by:
Is it safe to do what is below? deleting from a resultset while you are processing it? I don't know how dynamic the SQL database is. I assume you get a cursor to live dataset. Even if it is a...
9
by: Hamed | last post by:
Hello I have a DataGrid that a is bound to a DataTable. Some of the rows in the DataTable should not be deleted. How can I prohibit deleting of some identified rows? The problem could be...
0
by: shalinmangar | last post by:
Hi, I use SkunkWeb as my application server for my web application. I intend to put up a blog on the website but I haven't been able to find out a good blogging software for SkunkWeb. Most of...
24
by: Frank Swarbrick | last post by:
We have a batch process that inserts large numbers (100,000 - 1,000,000) of records into a database each day. (DL/I database.) We're considering converting it to a DB2 table. Currently we have...
4
by: MiziaQ | last post by:
Hey, I'm using the following code to write entries to a data file and then read them in an msflexgrid. I now would like to add code under a delete button to use the table(grid) to delete rows from...
2
by: Brad Pears | last post by:
I am working on a new vb.net 2005 project using SQL server 2000 as the backend db. I have a listview where control I want a user to be able to select either just one or multiple rows in the...
1
by: Kyosuke18 | last post by:
Hi everyone, I have a problem in deleting a data that is connected on the database.. I tried this code but it shows me an error: Run-time error '-2147217900(80040e14)': Syntax error in string in...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.