PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 4th, 2000, 04:10 AM
christian christian is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Posts: 1 christian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My problem is that my query on a MySql-table with php doesn't work on the Mac.

I have made a similar search-form earlier that is just fine on all platforms.

Isn't php sending pure html to the webserver?
And if the output of html where incorrect (unclosed tables, nested form tags ...), then I suppose it wouldn't work on NS pc either?!

Anyone that recognize the problem?

<code>

switch($search):
case "Sök":
/* Build the query string from the data passed in. */
$NUM_RECS = intval($NUM_RECS);
$query = "SELECT * FROM " . $table;
$action = " WHERE ";
if($searchfor <> ""):
$query .= $action ."(verk LIKE '%" . $searchfor . "%' OR rescensioner LIKE '%" . $searchfor . "%' OR verkkommentar LIKE '%" . $searchfor . "%')";
$action = " AND ";
endif;
if($beskrivning <> ""):
$query .= $action . "beskrivning = '" . $beskrivning . "'";
$action = " AND ";
endif;
if($aerefter <> ""):
$query .= $action . "aer >= '" . $aerefter . "'";
$action = " AND ";
endif;
if($aerfore <> ""):
$query .= $action . "aer <= '" . $aerfore . "'";
$action = " AND ";
endif;
$query .= " ORDER BY '" . $order . "'";
$query .= " LIMIT " . ($offset != 0 ? "$offset, $NUM_RECS" : "$NUM_RECS");

$countquery = "SELECT count(*) AS numrows FROM " . $table;
$action = " WHERE ";
if($searchfor <> ""):
$countquery .= $action ."(verk LIKE '%" . $searchfor . "%' OR rescensioner LIKE '%" . $searchfor . "%' OR verkkommentar LIKE '%" . $searchfor . "%')";
$action = " AND ";
endif;
if($beskrivning <> ""):
$countquery .= $action . "beskrivning = '" . $beskrivning . "'";
$action = " AND ";
endif;
if($aerefter <> ""):
$countquery .= $action . "aer >= '" . $aerefter . "'";
$action = " AND ";
endif;
if($aerfore <> ""):
$countquery .= $action . "aer <= '" . $aerfore . "'";
$action = " AND ";
endif;
$countresult = mysql_db_query($database, $countquery);
$countrow = mysql_fetch_array($countresult);
$result = mysql_db_query($database, $query);
$numrows = intval($countrow[0]);

?>
</code>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > SQL-query works on IE NS pc but not on IE NS mac

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap