|
I'm using a simple GridView to display some tabular data straight from a SQL Server DB. I know using the built-in paging functionality is inefficient because it pulls the entire dataset on every bind. At the moment that's fine, there are only a few dozen...
Started by Bryan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Can you profile with test data? If so I highly recommend just trying increasing amounts of rows until implement data paging when the volume....
Ideally, you should never return more than the rows being used.
To worry about it for a long time.
|
|
I want to find out how many rows are in a table. The database that I am using is a MySQL database. I already have a Db_Table class that I am using for calls like fetchAll() . But I don't need any information from the table, just the row count. How can...
Started by Andrew on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want be none since that function would just... .
You could do a
SELECT COUNT(*) FROM your_table
$dbo->setFetchMode( Zend_Db::FETCH_OBJ ); $sql contains the number of rows
Your ZF option is fetchAll() and then count($tableObject) .
|
|
I am lost in a big database and I am not able to find where the data I get comes from. I was wondering if it is possible with SQL Server 2005 to search for a string in an all the tables, rows and columns of a DB?
Does anybody has an idea if it is possible...
Started by Martin on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
I suppose to use INFORMATION WHERE ColumnNamesCSV IS NULL INSERT INTO @Tables (N, TableName, ColumnNamesCSV) SELECT ROW_NUMBER ColumnNamesCSVLike IS NULL INSERT INTO....
See below.
Need to grab all (n)varchar columns in db and make a search.
|
Ask your Facebook Friends
|
How to delete all rows from table before starting inserting them?
Started by Tom on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Dim cnn as Connection Dim cmd as Command Set cnn=new Connection() cnn.ConnectionString... .
Therefore in order to delete a table records you can use a command object to do that .
If you are programming vba I assume that you are working with Adodb or simply ADO .
|
|
I'm trying this:
function send_sms() { $liveQuery = $this->db->get('liveList'); $counter = 0; foreach($liveQuery->result() as $row): $counter = $counter+1; echo("Not hatin', just iteratin'. Message " . $counter); endforeach; }
When liveList has...
Started by Frode on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This post should help you:
http://codeigniter.com/forums/viewthread/129194/
Blank pages are normally a symptom of time-outs... .
I am not familiar with codeigniter, but do you have php error reporting on? There could be an error being thrown that's hidden .
|
|
I would like to iterate over the data rows stored in a Zend_Db_Table_Rowset object and then drop/unset some of the rows, if they don't fulfil certain criteria.
I could use toArray() to get only the data rows from the object and then it would be easy to...
Started by tharkun on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
$rows = array(); foreach($rowset as $row) { $rows[$row->id] = $row; } foreach ($rows as $key => $row) { if(!$condition == satisfied) { unset($rows[$key]); } }
Not the most efficient....
The array.
|
|
I have created a single table in my primary DB called tblGlobalIDMapping that will assign a GUID to all entries and store the other 3 primary ID's across the App to provide for a single ID repository.
The new Table is in the following structure -->...
Started by Refracted Paladin on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
SELECT PersonID, Min(CASE WHEN ApplicationID = 1 THEN PersonApplicationID END) AS 'DRIMaster', Min(CASE WHEN ApplicationID = 6 THEN PersonApplicationID END) AS 'DRIClient' FROM tblApplicationAssociation WHERE ApplicationID... .
Aggregates ignore nulls, so....
|
|
I am planning to create a mysql 5 (myISAM) table that will contain x thousand rows of data. Each row will have a count field, & the rows with the 20 highest count values will be retrieved quite a lot, probably on a one-for-one ratio to every row update...
Started by rutherford on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Done!
(Or, you could spend the next few hours tweaking your query and parameters and indices and making it all "just right".)
Add ... .
To get the top 20, just consult that table.
Every five minutes, empty out and then copy the top 20 to a separate table .
|
|
I have a situation where I have a bunch of rows in a database. For example, let say we have a table called ReportRendererType.
Rows might be:
Line Graph Bar Graph Grid etc.
I can use the database to store how particular users want to view particular reports...
Started by Daniel on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I suggest that you not associate code with database rows! This is quite contrary.
Then you give that Factory Parameter and the Factory cann look at the DB this is an idea.
A RendererFactory which has GetRenderer.
|
|
I have a ftp repository that is currently at 2761 files (PDF files). I have a MySQL table (a list of those files) that's actually at 29k+ files (it hasn't been parsed since a recent upgrade). I'd like to provide admins with a one-click script that will...
Started by Chad Edge on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Or do what mysqldump does, generate insert into....
I propose you to use pdo prepared insert statement to reduce time .
Yup that is the solution.
Load the list of filenames into another table, then perform a couple of queries that fulfill your requirements .
|