Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. never mind, i can't edit the post anymore, here SELECT gold_logs.*,members1.name,members1.star,members2.name,members2.star FROM gold_logs LEFT JOIN ibf_members members1 ON members1.id = gold_logs.to_id LEFT JOIN ibf_members members2 ON members2.id = gold_logs.from_id WHERE gold_logs.to_id = 1
  2. not your fault, I continuously keep messing up the query, its been a long day.. refer to my edit again in a minute
  3. yeah, refer to my edit
  4. SELECT gold_logs.*,members1.name,members1.star,members2.name,members2.star FROM gold_logs LEFT JOIN ibf_members members1 ON ibf_members.id = gold_logs.to_id LEFT JOIN ibf_members members2 ON ibf_members.id = gold_logs.from_id WHERE gold_logs.to_id = 1
  5. show both of your mysql tables, it may be that ibf_members needs to be the left table
  6. While this is good practice, it is only for ambiguity purposes, and this case in particular it will not affect the outcome. OP, simply join the table using the from_id. The where clause will control your main table. SELECT gold_logs.*,name,star FROM gold_logs LEFT JOIN ibf_members ON gold_logs.from_id = ibf_members.id WHERE gold_logs.to_id = 1
  7. Then your conditions are not being met, how can ibf_members.id equal two values at once? Perhaps you meant OR not AND
  8. Best bet is \r\n
  9. Okay, let's say you are returning $total from your function. Set the function itself to a variable, this will hold your $total value.
  10. Couple things, since $ pollId needs to be an int, type cast it into an int before using it in your function. You check for $pollResults being empty, when the variable does not yet exist in the function. I'm assuming you want to output the difference, if you are doing math to $pollResults, remove the quotes around the subtraction operators.
  11. Well "16" is a numerical string, not an integer. We really need to see how your code is handling it's argument.
  12. Some os accept simply then newline character, some require the carriage return, some require both.
  13. Really depends on what os you have, you may have to use "\r\n"
  14. If you are trying to output each value on a new line, echo them with a line break. Foreach($arr['success'] as $value){ echo $value . "<br />"; } Or you can store the values in an array for later use.
  15. http://php.net/manual/en/language.references.pass.php
  16. If you want the query to match exact strings, then like isn't what you want, use = Edit: as pickachu already stated
  17. $arr = your array; Foreach($arr['success'] as $key=>$val){ // execute code for $arr['success'] }
  18. your code editor is encoding your script with a BOM (you can google BOM if you don't know what it is), which outputs to the browser, thus rendering session_start problematic, since no output can be sent to the browser before calling that function. You will need to change you encoding type to UTF-8 without BOM. should be in the settings, under encoding, depending on what editor you are using.
  19. let's stay on topic, OP you will want to use a combination of mysql and ajax for this. depending on how exactly you want to go about it, you would query the first row to appear, then when the "next" button is clicked, send an ajax request to grab the next row, and so on.
  20. not really sure what you are asking, but i will take a stab, perhaps you want to set a limit on the number or rows that the query grabs?
  21. what is the contents of base.php?
  22. for limit 0,30 0 is the offset, 30 is the number of rows to display
  23. really, you can keep the limit at a constant (number of things per page), the offset is the $variable that will need to be dynamic.
  24. where is your link establishment using mysql_connect?
  25. this has nothing to do with the query, the error lies somewhere else in your code.
×
×
  • 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.