Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

128 Excellent

About niche

  • Rank
    Devoted Member
  • Birthday 01/01/1958

Profile Information

  • Location
    Lincoln, Nebraska, USA
  • Interests
    coding, inventing, selling, building large scale models, sci fi

Previous Fields

  • Languages
    php, mysql, html, css, javascript

Recent Profile Visitors

52,347 profile views
  1. strpos

    thanks dsonesuk!
  2. strpos

    $haystack = ",18,19,42,"; $needle = ",18,"; if (strpos($haystack,$needle)) { echo 'TRUE'; } else { echo 'FALSE'; } This returns FALSE. What am I missing?
  3. Slash using PDO's bindparam

    Turn's out the problem was in my bootstrap. Thanks to ingolme and jsg. It was jsg's post that got me to thinking more broadly and ingolme's last post that zeroed in on the real problem. Thanks again for your patience.
  4. Slash using PDO's bindparam

    Thanks for the question jsp. Things just got weirder. Yes, I can select 'Coffee / Tea' directly. Seems I can get the same results even after I change 'Coffee / Tea' to ' ' in the table (new issue)! This is a live Godaddy server. I wonder if it has some kind of a virus or malware? everything else works as expected. EDIT: Cleared cache, got same results on chrome, ff, and ipad. hmmm.
  5. Slash using PDO's bindparam

    Thanks for your patience. I expect 2 rows returned from the my code. I get zero rows back and no errors. I have visually verified that 2 rows exist with the 'coffee / tea' string. I have also verified that error reporting is working.
  6. Slash using PDO's bindparam

    all error reporting is on. no error message is displayed. EDIT: Just found out that client manually entered coffee / tea. Does that make a difference?
  7. Slash using PDO's bindparam

    here's my simple example: try { $sql = 'SELECT itemandsize FROM itemandsize WHERE sub_category = :sub_category' ; $stmt = $this->db->prepare($sql); } catch (PDOException $e) { echo $e->getMessage() . '<br>'; } try { $stmt->execute(array(':sub_category' => $var)); } catch (PDOException $e) { echo $e->getMessage() . '<br>'; } $var = 'coffee / tea' I'm certain that the slash is the problem, but don't know why. Do you know why? I thought treating $var in the array auto resolved all formatting issues. Obviously not. $var = 'coffee - tea' works fine EDIT: Is it just that slashes are used for escaping?
  8. order of matching results

    My experience of how mysql determines what result goes first varies, that why I use the ORDER BY keyword.
  9. EASY FOR YOU (php javascript) !!

    don't understand your question

    need to do a join https://www.w3schools.com/sql/sql_join.asp
  11. addoption syntax

    $ was the givaway sorry about that.
  12. Blogger HTML posts problem

    try putting px after 0 EDIT: else, restore to the version before the changes
  13. Blogger HTML posts problem

    without access to the offending code that's producing the offending code, I think it's a google problem.
  14. addoption syntax

    $nt1 is an array https://www.w3schools.com/js/js_arrays.asp EDIT: the info between the commas are arguments addOption is a function (jquery i think)
  15. Regarding JS capabilities

    Sure. A javascript function could easily handle that. EDIT: the function could have a https://www.w3schools.com/jsref/jsref_match.asp and a https://www.w3schools.com/jsref/jsref_match.asp