JTapp Posted December 31, 2009 Share Posted December 31, 2009 I have narrowed down an issue and a question from a previous thread. It seems more complicated than I thought. Is there a chance that $metode and $search hoses the php when it is MySQL 5.0? The following code isn't loading: $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity FROM tblLodges WHERE TRIM(LEADING '0' FROM $metode) = '$search' GROUP BY strLodgeName LIMIT 50"); while ($row = @mysql_fetch_array($query)) { echo "<tr bgcolor=\"#dddddd\"><td><center>"; echo $row["intLodgeNumber"]; echo "</center></td><td><center>"; echo $row["strLodgeName"]; echo "</center></td><td><center><span class=\"style2\">"; echo "<input name=\"submit\" type=\"button\" value=\"Lodge Details\" onclick=\"javascript:window.location='http://www.gloklahoma.com/lodgelocator/3view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeLocationCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0'); Reply Quote Link to comment Share on other sites More sharing options...
Mchl Posted December 31, 2009 Share Posted December 31, 2009 Do it like this: $sql = "SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity FROM tblLodges WHERE TRIM(LEADING '0' FROM $metode) = '$search' GROUP BY strLodgeName LIMIT 50"; $query = mysql_query($sql) or die(mysql_error().": $sql"); This should show an error message that may help us. I think you might need '' around $metode. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 31, 2009 Share Posted December 31, 2009 You already have an existing active thread for this problem. Why start another thread? That just looses the history of how you discovered that the two variables are empty. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.