Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0
    Originally Posted by ptr2void
    I guess I'm just confused. You were going on about quotes, but that appears to be strictly a rendering issue and is not germane to the query not working.

    So where is your actual SQL call in PHP? Is it failing? If so, what error is reported?
    Okay, So the <pre> tag worked to sort the Quote issue and it is rendering properly. I have since eliminated the "quote" issue from the equation and found the real problem which was, I had a conditional statement that basically said if $array > 0 return results else display the no result message. I overlooked this while doing my debug and realized that if my query only returned 1 result it would need to be $array >= 0.

    Thank you all for your help, and I will be using <pre> tags from now on with my debugging.
  2. #17
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    You need to get a proper browser. A browser that "beautifies" characters by replacing them with different characters is in no way fit for use in development. Since you obviously work on Mac OS, I've checked Safari, and it actually does have a feature called "smart quotes" and several other subsitutions. That's great for fancy looks (which seems to be the most important thing in the Apple world), but you cannot check your code with that.

    I think there's a misunderstanding regarding font rendering. As I already tried to explain earlier, the straight single quote is a specific, unique character. It may look differently in different fonts, but it's always the same character. So if this was just about rendering, there wouldn't be any problem. Because rendering only affects the looks of the character, it does not change the character itself. But what your browser actually does is replace the quotes with completely different characters. In other words, it messes with the page content.

    When experiencing problems like that, it's a good opportunity to get familiar with more lowlevel ways of debugging. For example, MySQL has a query log, which is a much more reliable source than any browser output.
    Last edited by Jacques1; April 11th, 2013 at 08:22 PM.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo