Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Nevermind, re-read the function.
  2. You need to check for errors. See the link in my signature - it contains mysqli information but the same concept applies with any DB. Check the PHP manual for the functions you'll need.
  3. I sure am. ARE YOU? Because you're the one trying to use it. As I said twice before your code doesn't indicate at all WHAT LIBRARY OR CLASS your $db object is. If you're trying to say it's just the basic PDO in PHP, then look at the manual! This is your code that you say has the problem. $res = $db->dbh->prepare($sql); $res->execute(array_values($params)); (array_values is superfluous). But later you posted this code: $ststres = $db->dbh->prepare("SELECT * FROM ".USERS_STATS." WHERE user_id = :uID ORDER BY id DESC LIMIT :zero, :forty"); $ststres->bindParam(':uID',$udata['id'],PDO::PARAM_INT); $ststres->bindValue(':zero',0,PDO::PARAM_INT); $ststres->bindValue(':forty',40,PDO::PARAM_INT); $ststres->execute(); Which part is giving you the error? {assign var='brgdatas' value=$brgObj->fetchOneBrg(array(['id'=>$ststres[ststval].to_id]))} Does it work when you use the function in PHP instead of in your Smarty tpl? You have a lot going on in that line of Smarty code, and the problem could be in there.
  4. That has nothing to do with what I said. Clearly execute() wants a string. Did you write the function execute() or are you using a third party library?
  5. Well it depends what your database class expects. You haven't said what class you're using, or any info on it. Look at what execute() expects to receive as arguments.
  6. Please use our code tags, your post is very hard to read, especially with the background color. Most likely, the execute function expects a string with your SQL query, then the parameters to bind.
  7. You'd use an if() statement in your PHP. Post the code that constructs the table.
  8. Srsly? Why??
  9. In addition to what was already said, typically a "somethingID" would be a number, and should not be in quotes. You should ALSO be using the user ID not a username.
  10. Honestly, you should probably be using CSS and PHP to do this rather than javascript.
  11. I don't think you can bind a table name, it's for values only.
  12. First of all, you should be explicit with your join. A join would look like this: SELECT t1.fields, t2.fields FROM t1 LEFT (or INNER) JOIN t2 ON t1.fk = t2.pk WHERE t1.field = 'value'; However, you need to explain your goal a little better. " looking through two tables to find one row" doesn't make much sense.
  13. Hashtag is a nickname for when people do #this on twitter. Hash is a one-way encryption of data. You cannot hashtag your data. You can hash it.
  14. Quite what? :-P
  15. Check for errors in your query - see the link in my signature. With such a complicated query I'm sure there's an error. Getting the error message would help.
  16. Are you guys seeing it in your browser? I'm using Chrome and I don't see it. I see it in the screencap obv.
  17. What happens when you do a print_r on $results['public']['players'][0]? What about $results['public']['players']? and $results['public']? You need to try to do a little debugging now.
  18. 0 != '0'
  19. $arr['public']['gq_numplayers'];
  20. This doesn't make sense, you're NOT escaping twice. However, look at what you are doing different between insert and updated. 1. $request = mysqli_real_escape_string($myConnection, $request); 2. $praise = mysqli_real_escape_string($praise); What's different about these?
  21. It wasn't a rant about you.
  22. I know for a fact you've been told to research normalization, and you've also been spoon-fed information on proper normalization. You consistently ask questions about the same thing you've already been told how to handle it. Dogs have this thing where they are unable to generalize concepts. Are you a dog? Because that might explain why you need to be told every time to normalize your data, and stop pooping everywhere.
  23. *shrug* It's not my fault that the last few generations have been so pampered and babied that they interpret emotionless facts as "not nice" and can't handle it when someone actually is being "not nice". Waaah self-confidence, Waaaah offended, Waaaah judging. Waaaaah grow up and stop getting so butt hurt. Op: read the links in my signature about SQL and errors. (Or all of them )
  24. Look at the line before 90.
  25. <link rel="stylesheet" type="text/css" href="style.css"> You need to use the full path to the css file, since you don't have a folder called the state's name.
×
×
  • 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.