View Single Post
Old 02-18-2007, 08:58 AM   #6 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,712
redhead is on a distinguished road
Perhaps somethings along the lines of:
PHP Code:
<?php
session_start
();
$result mysql_query("SELECT id, date, full_add, status, size, price, price_psf FROM $table WHERE (full_add $r1 '%$Text_Box_1%' $r2 full_add $r5 '%$Text_Box_2%' $r3 full_add $r6 '%$Text_Box_3%' $r4 full_add $r7 '%$Text_Box_4%') AND (status = '$status') AND (size >= '$Text_Box_15' AND size <= '$Text_Box_16') ORDER BY price DESC"); 
$_SESSION['result']=array();

while(
$rows=@mysql_fetch_array($result))
        
$_SESSION['result'][]=('id'=>$row['id'], 'date'=>$row['date'], 'full_add'=>$row['full_add'],
                              
'status'=>$row['status'], 'size'=>$row['size'], 'price'=>$row['price'], 'price_psf'=>$row['price_psf']);
?>
Now you have the results gathered in these $_SESSION variabels, so when ever you want to use them, you'd do something like:
PHP Code:
<?php
session_start
();
foreach (
$_SESSION['result'] as $row)
    
mysql_query("INSERT INTO table (id, date, full_add, status, size, price, price_psf) VALUES ($row['id'], $row['date'], $row['full_add'], $row['status'], $row['size'], $row['price'], $row['price_psf']");
>?
Or however you want to use the stored values....
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is online now   Reply With Quote