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

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

add 20 000 to the rowcnt
Hi ...
I need to add 20 000 to the row count but just cant find a way to do this i am new to php

Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

BAPI BBP_INB_DELIVERY_CREATE - material number missing in delivery
Hi Experts,

I was able to successfully create an Inbound delivery with reference to a PO

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

Got A Free Server :(
So I was given a free server

http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

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