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

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

Sales orders ans reservations not taken into account on MPS / MRP
Hello,

I am implementing the MPS / MRP and I have the following problem:

I ha

Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Schedule editor
Hi,

I have a question related to Schedule editor.
If we schedule a BLS for every 30

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

Sequre login with cookies.
I want to build secure login with cookies. I just want your ideas about this, your suggestions. What

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