fetchall Questions
2
Solved
I'm having trouble getting my data from fetchAll to print selectively.
In normal mysql I do it this way:
$rs = mysql_query($sql);
while ($row = mysql_fetch_array($rs)){
$id = $row['id'];
...
2
Solved
I have an SQL query that selects from two inner joined tables. The select statement takes about 50 seconds. However, the fetchall() takes 788 seconds for only 981 results:
time0 = time.time()
self....
Organzine asked 26/4, 2012 at 15:24
6
Solved
I am using psycopg2 module in python to read from postgres database, I need to some operation on all rows in a column, that has more than 1 million rows.
I would like to know would cur.fetchall() ...
Stethoscope asked 29/7, 2013 at 20:14
0
I have the following code that runs very slowly (6.5sec for iterating over 57,390 rows) :
import mysql.connector
cnx=mysql.connector.connect(host=***, ***)
cursorSQL = cnx.cursor()
for dt in da...
Attitudinize asked 15/3, 2017 at 17:3
1
I have a weird problem, and I'm not too sure how to fix it after searching Google/SO found nothing similar.
When I tried to grab query results from the cursor, it gives me a tuple of tuples, excep...
Anywheres asked 17/4, 2015 at 4:36
5
I would like to know if i'm doing fine OR fetchAll() doesn't work with WHILE.
here is an exemple
$db=new PDO("mysql:host=" .$dbhost. "; dbname=" . $dbname, $dbuser, $dbpass);
$page=$db->prepa...
Patellate asked 18/7, 2013 at 16:39
2
Are there any side effects to turning off emulation when using prepared statements with pdo? I'm using a select * and limiting the results which needs to be handled as an int and not a string. I ca...
Leckie asked 30/3, 2013 at 11:43
3
Solved
I have problems with PHP in Ubuntu 10.04. When I try use mysqli_result::fetch_all this error appears:
Call to undefined method mysqli_result::fetch_all()
However, it works in Windows XP.
The Cod...
4
Solved
I'm trying to use fetchAll on a query that has 2 variables. I can't figure out the syntax.
I can manage with only 1 variable:
$sql = "SELECT * FROM mytable WHERE field1 = ?";
$this->_db->fet...
Clostridium asked 8/7, 2010 at 9:11
3
Solved
I have been working on speeding up a query I'm using for about a week now and asked several questions about it here ( How can I speed up fetching the results after running an sqlite query?, Is it n...
Cohort asked 10/5, 2012 at 10:15
1
Solved
As an answer on my question: Is it normal that sqlite.fetchall() is so slow? it seems that fetch-all and fetch-one can be incredibly slow for sqlite.
As I mentioned there, I have the following qu...
Ortiz asked 2/5, 2012 at 11:14
1
Solved
Imagine I have a mysql cursor and data read. The amount of data might be very big that I want to deal with one line each time.
An easy and straight forward way might be like this:
while True:
row ...
Cicatrix asked 1/6, 2011 at 3:33
2
Can i override fetchall method in a model? I need to check sth everytime fetchAll is called. The model extends Zend_db_table_abstract
Reformism asked 9/10, 2008 at 10:1
1
© 2022 - 2024 — McMap. All rights reserved.