Need understanding of this bit of code


Posted on 16th Feb 2014 07:03 pm by admin

Code: <?php
// WHERE clause filters
$arrSQLFilters = array();

Did you know?Explore Trending and Topic pages for more stories like this.
// whether or not zip codes table needs to be included
$boolIncludeZipCodes = false;

// Zipcode filter
if(!empty($strZipCode)) {
$boolIncludeZipCodes = true;

$arrSQLFilters[] = sprintf(
"z.zip LIKE '%s'"
,"%$strZipCode%"
);
}

// State filter
if(!empty($strState)) {
$boolIncludeZipCodes = true;

$arrSQLFilters[] = sprintf(
"z.state = '%s'"
,$strState
);
}

// Restaurants name filter
if(!empty($strName)) {
$arrSQLFilters[] = sprintf(
"r.restaurantname LIKE '%s'"
,"%$strName%"
);
}?>
No comments posted yet

Your Answer:

Login to answer
267 Like 51 Dislike
Previous forums Next forums
Other forums

Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this

Product categories for registration
Dear all,

We are going live with the Supplier registered next week. At standard, the 'sel

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

Custom list order
Hi there,

I have checked this tutorial and it's great till the point where I want to display

how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash