/    Sign up×
Community /Pin to ProfileBookmark

Parse error: syntax error, unexpected $end on line 323?

Hi hope you can help, I am just finishing off a site but unfortunately the search function is now playing up. After I have edited the php file.

I now receive this message where it should show up search results:

Parse error: syntax error, unexpected $end in includessearch_query.php on line 323

i know this is sometimes due to a bracket/brace missing or the php tag itself but i’ve tried everything checking and double checking.

would like another pair of eyes to look at it, if someone would? the file is attached in .txt format

thanks

[upl-file uuid=3ced0ab6-0b98-4164-a7e9-197b34bb5d61 size=10kB]search_query.txt[/upl-file]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@gavshouseJan 26.2011 — Line 163 is missing a end brace
Copy linkTweet thisAlerts:
@OctoberWindJan 26.2011 — to be a little more specific, you're "opening" your if statement twice:

[code=php]
if($search_resorcom == "residential" || $search_resorcom == "") { // take out this brace
{ // or take out this brace
$query ="SELECT p.* FROM $wpdb->posts p, $wpdb->postmeta p1
WHERE p.ID = p1.post_id AND p1.meta_key='propertytype_res_value' AND p1.meta_value='$search_propertytype_res'";
$sptt = getIds( $query );

$_ids = ( !empty($sptt) ? ( !empty($_ids) ? array_intersect( $_ids, $sptt) : "" ) : "" );
}
[/code]
×

Success!

Help @Spyderman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...