|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
mysql affected rows
how can I learn affected rows after a query with python ?
I am using MySQLdb for included. does it support the function which like mysql_affected_rows like php ? best regards |
|
#3
|
|||
|
|||
|
it doesn't work
thank you mark,
but the sample for python 1.5.1 and I am using 2.3.4 and MySQLdb accessing mysql in the sample is very well for me . because it like php importing mysql begin of the code, not mysqldb. this mysql module is different from mysqldb or it is old version of mysqldb. regards |
|
#4
|
||||
|
||||
|
Sorry, i hadnt expected them to change the interface
. Silly me. Anyway, this page: http://phplens.com/lens/adodb/adodb-py-docs.htm seems to think that you can use th Affected_Rows() method. Wether or not this is true i dont know.Ill install MySQLdb and let you know. I really need to learn how to build MySQL on Unix anyway .Mark. |
|
#5
|
||||
|
||||
|
Ok, scratch that. After installing MySQL 4.0.20 and MySQLdb 1.0.0 on my IBook you can clearly see that the method is called affected_rows()... Which prompts me to say, STOP changing the name guys
.Quote:
So in theory that should do it .Take care, Mark. |
|
#6
|
|||
|
|||
|
it works
thanks mark,
it works. I tried it yesterday but I couldn't find affected_rows function because I guess I should be try to dir(result) but I have to check dir(connection) whatever, I write script to help me. it works like that, it take functions about a value and docs and write to screen with for , aa = dir(value) for a in aa: print a, "\n help : \n", a.__doc__ , "\n\n" something like that. I can see which functions I can use with my variables. but I dont know yet how can I add this script to under site-packages if I can add a python module, I can call it everytime when I need it like a function. thanks again, mohikan |
|
#7
|
||||
|
||||
|
Im a little comfused, nothing new there
. It is working though right?If you want to add a script to site-packages just save the file and move it into the site-packages directory. You should then be able to import it without any problems. Mark. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > mysql affected rows |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|