RE: Cleaning a resultset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi,
> 
> I have a resultset from a query and need to remove some rows after doing
> some php processing then insert into another table i.e.
> 
> /** Get data**/
>  $qid = mysql_query('SELECT ...);
> 
>  /** Clean data **/
>  while( $r = mysql_fetch_object( $qid ) ) {
> 
>  }
> 
> How can i generate a new resultset / remove data from the existing
> resultset
> using this method?
> 
> Thanks for your help

Hi Shaun,

Basically while iterating thru the resultset in $qid, test / cleans the data
row by row, and perform an INSERT query for each row within your while loop
that you want to be inserted into your other table.

Hope this helps.

Much warmth,

Murray
---
"Lost in thought..."
http://www.planetthoughtful.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux