Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About soycharliente

  • Rank
    Prolific Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Atlanta, GA
  1. I don't need help anymore. I spent the last 30-45 minutes painstakingly laying out my problem only to figure it out just before hitting submit while reading it over one final time. So, thank you for continuing to offer this forum as a resource online so I could do some rubber duck debugging. I haven't been active on here in quite a while, so I am glad to be doing some programming again so I can start contributing content/answers more. Solution: I copied some code from the PHP manual and forgot to change the variable being referenced by mysqli_commit from the example variable to my da
  2. Ahhhh. I am teaching myself JOIN and I found example code that I tried to rewrite. That totally makes sense. The IFNULL part was something I read on SO and they said it was needed. I couldn't ever get 0 to show up when I used COUNT alone. Maybe I made more than one change at the same time without realizing and adding the INFULL combined with some other change got it working. When I added it the 0 counts started showing up. I still don't fully understand what the IFNULL part was doing, but my code isn't live yet and I was still trying to understand it before pushing it out. Guess I don
  3. Hello! I'm trying to display a list of clients and count the number of items they have in another table including clients that have a count of 0. The structure of my two tables looks like this: clients ---------- id name items ---------- id client_id item_id The query I have so far is: SELECT c.*, IFNULL(COUNT(i.item_id), 0) as numItems FROM clients c LEFT JOIN items i on c.id = i.client_id GROUP BY i.client_id ORDER BY c.name I'm close, but it stops at the first client with 0 items and doesn't show anymore clients. If that client with 0 items finally gets some items, the next client
  4. Am I correct in thinking that my regex is returning the format error because encoding the input is creating a longer string behind the scenes? I cannot figure out why a string of less than 64 characters is throwing an error. I am using htmlentities() to make sure that the presence of a double quote doesn't break my HTML code. When I check the source code of the submitted form, things like & is converted to & and " to " as I would expect. <? $errors = FALSE; $e_name_e = FALSE; // error name empty $e_name_f = FALSE; // error name format if ( isset($_POST['submit']) && !empt
  5. I don't think you're showing enough code for us to really be able to help you. I'm going to make a HUGE assumption since I see a single quote at the very end of your HTML. Is all of this HTML output a single string with your PHP variables referenced inside? If that's the case, your syntax for referencing variables inside of quotes is incorrect. $output = 'My name is: ' . $name; $output = "My name is: " . $name; $output = "My name is: {$name}"; If you're using single quotes, you must concatenate the variable. If you're using double quotes, you can either concatenate or wrap the variable insi
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.