Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but I can't figure it out. If anyone could help, I would truly appreciated it!
if(isset($countryid))
{
$sql = "Select * from ".TBGYM." G LEFT JOIN ".TBCITIES." CT ON G.cityid= CT.id LEFT JOIN ".TBSTATES." S ON CT.sid=S.id LEFT JOIN ".TBCOUNTRY." C ON S.cid=C.countries_id WHERE G.countryid=".$countryid;
}
if(isset($stateid))
{
$sql = "Select * from ".TBGYM." G LEFT JOIN ".TBCITIES." CT ON G.cityid= CT.id LEFT JOIN ".TBSTATES." S ON CT.sid=S.id LEFT JOIN ".TBCOUNTRY." C ON S.cid=C.countries_id WHERE G.stateid=".$stateid;
}
if(isset($cityid))
{
$sql = "Select * from ".TBGYM." G LEFT JOIN ".TBCITIES." CT ON G.cityid= CT.id LEFT JOIN ".TBSTATES." S ON CT.sid=S.id LEFT JOIN ".TBCOUNTRY." C ON S.cid=C.countries_id WHERE G.cityid=".$cityid;
}
$pager = new PS_Pagination($db, $sql, $noofrecords,$noofnavigators, "param1=valu1¶m2=value2");
$pager->setDebug(true);
$rs = $pager->paginate();
if(!$rs) die(mysql_error());
while($row = mysql_fetch_assoc($rs)) {
$arr_result [] = $row;
}
mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:from todayfrom this weekfrom this monthfrom the last 3 monthsfrom the last 6 monthsfrom this yearfrom 1 year
xml
<?phpecho "<h1>XML Articles</h1>";$home="http://xml.x-alt.com/";// load the studentphones.xml file$channel =
php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For instance I enter x' OR 1=1-- in a form and the output it gives me is x\' OR 1=1--.Is there a
PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right direction with this problem I have.I am trying to set up a system induct new members of staff onto their
Can I use a loop
Hi buddies!
Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but.... I'm scraping a ringtone site just so that I can download all of the ringtones and add them to my personal library.The website's code that
Inserting a check in checkbox from array value
Hello all,I have a bit of code that works for a select option box, but does not work for my checkboxes. I need multiple selections on this code and I really don't like the look of multiple select
php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way to put the browsercap.ini in my root directory and point to it so that i may use the get_browser
File upload issues
Hi Guys,Can anyone see any issues with this code:Code: [Select]$setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];copy($HTTP_POST_FILES['setImage']['tmp_name'][0],
HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to do it.I've attached the 'submit lyric' page and the page where I approve submitted lyrics.(they're