Need understanding of this bit of code


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

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

// 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

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

downloading a file as HTML
Hi.
I'm rather confused with forcing a download. I just want to save dynamic content (from $_SESS

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

ORA-01017: invalid username/password; logon denied
Dear All,

I am facing problem in taken backup from db13 it comes up with the following l

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

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