Sedang Disiapkan

224606 search amendment

Hi Hari,

I Hope you are well. You kindly did a bit of work on [url removed, login to view] for us a few weeks ago. I wondered if you could do a quick amendment to the code you wrote?

Currently the search results are ordered by paying listings first and the newest of these are at the top.

We would like to order the results so paying listings are still at the top (eg. those with images and user_id >1) but have them ordered in a random like way. eg. order by rand() while keeping the paying listing at the top and the non paying ones secondary.

Can you do this for us and can you give me a cost estimate?

Here is a sample page to look at:

[url removed, login to view];city=&county=Essex&venue_type=

Here is the current code for the search:

[code]

$select_list = "SELECT ";

$table_num = 0;

$flag = 0;

$from_list ='';

$where_codn = '';

if($city <> '')

{

$table_num++;

$select_list .= " l".$table_num.'.field_value AS city,';

$from_list .= " listingsDBElements l".$table_num.",";

$where_codn .= " l".$table_num.".field_name = 'city' AND l".$table_num.".field_value like '%$city%'";

$where_codn .= " AND [url removed, login to view] = l".$table_num.".listing_id AND base.user_ID = l".$table_num.".user_id ";

$flag = 1;

}

$county1 = $HTTP_GET_VARS['county'];

if($county1 <> '')

{

$table_num++;

$select_list .= " l".$table_num.'.field_value AS county,';

$from_list .= " listingsDBElements l".$table_num.",";

if($where_codn <> '')

$where_codn .=" and ";

$where_codn .= " l".$table_num.".field_name = 'county' AND l".$table_num.".field_value like '%$county1%'";

$where_codn .= " AND [url removed, login to view] = l".$table_num.".listing_id AND base.user_ID = l".$table_num.".user_id ";

$flag = 1;

}

if($venue_name <> '')

{

$table_num++;

$select_list .= " l".$table_num.'.field_value AS venue_name,';

$from_list .= " listingsDBElements l".$table_num.",";

if($where_codn <> '')

$where_codn .=" and ";

$where_codn .= " l".$table_num.".field_name = 'venue_name' AND l".$table_num.".field_value like '%$venue_name%'";

$where_codn .= " AND [url removed, login to view] = l".$table_num.".listing_id AND base.user_ID = l".$table_num.".user_id ";

$flag = 1;

}

if($venue_type <> '')

{

$table_num++;

$select_list .= " l".$table_num.'.field_value AS venue_type,';

$from_list .= " listingsDBElements l".$table_num.",";

if($where_codn <> '')

$where_codn .=" and ";

$where_codn .= " l".$table_num.".field_name = 'venue_type' AND l".$table_num.".field_value like '$venue_type'";

$where_codn .= " AND [url removed, login to view] = l".$table_num.".listing_id AND base.user_ID = l".$table_num.".user_id ";

$flag = 1;

}

$select_list .= " [url removed, login to view] as listing_id, base.user_ID as user_id ";

$from_list .= " listingsDB base ";

if($table_num > 0)

$where_codn .= " AND [url removed, login to view] = l".$table_num.".listing_id AND base.user_ID = l".$table_num.".user_id AND [url removed, login to view] = 'yes' order by base.user_id desc ";

else

$where_codn = " 2=3 ";

$sql3 = $select_list . ' from '. $from_list.' where '. $where_codn;

[/code]

You may need ftp access should you take the job which I can give you (same as last time).

Best Regards,

Bob

Kemahiran: Semua Boleh, MySQL, PHP

Lihat lebih lanjut: take job, search here, sample job listing, city hope, search images, desc, mysql code search, sample code ftp, amendment, best search images, mysql search page, ftp search, quick search, cost estimate php mysql, flag images, city search, access job cost, listing search results, top search results, images search, search current page php, random select access, random images mysql, php random sample, ftp estimate

Tentang Majikan:
( 5 ulasan ) Instow, United Kingdom

ID Projek: #1970842

Dianugerahkan kepada:

ecartsolutions

Hi Bob As discussed in MEssage Board. Hari

$15 USD dalam 0 hari
(312 Ulasan)
6.5