Xtremer360 Posted February 20, 2011 Share Posted February 20, 2011 I don't know if its the server or what but all my single quotes get turned into ` or something odd when queries get executed on a page? Any ideas on why or has this ever happened to anyone else on any other server? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted February 20, 2011 Share Posted February 20, 2011 It's hard to really tell what's happening based on your example. Quote Link to comment Share on other sites More sharing options...
Xtremer360 Posted February 20, 2011 Author Share Posted February 20, 2011 Well when I'm inside the html editor of a page edit I am using single quotes but then after I submit the changes and have it echo out queries for testing it turns the single quotes into backticks. Has this happened to anyone else? Quote Link to comment Share on other sites More sharing options...
Philip Posted February 20, 2011 Share Posted February 20, 2011 Are you sure they are backticks ( ` ) and not quotes ( ‘ - ‘ ) instead of apostrophes? If you're copy/pasting into the html file that can some times carry over. Quote Link to comment Share on other sites More sharing options...
Xtremer360 Posted February 21, 2011 Author Share Posted February 21, 2011 Even when I type this code into the HTML view of the page editor inside of WordPress I still get that problem. The code and link are below. kansasoutlawwrestling.com/roster <div id="roster" class="content"> <h1 class="pageheading">Singles Biographies</h1> <span class="minilinks"><a href="/roster/tag-team-roster">Tag Teams</a> | <a href="/roster/stable-roster">Stables</a> | <a href="/roster/manager-roster">Managers</a> | <a href="/roster/referee-roster">Referees</a> | <a href="/roster/staff-roster">Staff</a></span> <?php $query = "SELECT characters.shortName, characters.characterName FROM characters as characters LEFT JOIN singles as singles ON characters.ID = singles.characterID WHERE characters.styleID = '1' AND characters.statusID = 1 ORDER BY characters.sortOrder"; $result = mysqli_query ( $dbc, $query ); echo $query; while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) { $fieldarray = array('shortName','characterName'); foreach ($fieldarray as $fieldlabel) { if (isset($row[$fieldlabel])) { $fieldlabel = $row[$fieldlabel]; } } ?> <div id="wrestler"> <div id="headshot"> <?php if (file_exists('/images/headshots/' . $shortName . '.png')) { print '<img src="images/headshots/' . $shortName . '.png">'; } else { print '<img src="images/headshots/default.png">'; } ?> </div> <div id="wrestler-info"> <span class="rostername"><a class="biolinks" href="/bio?shortName=<?php echo $shortName; ?>"><?php echo $characterName; ?></a></span> </div> </div> <?php } ?> </div> 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.