Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. You're return;ing inside the loop. The whole function is actually kinda wrong. Try again. Without a loop.
  2. That's right, it's supposed to be the URL to some processing thing on your server. You're the only one who can know what that URL is supposed to be.
  3. AJAX is asynchronous. Just because you put it in your Javascript before the .popover() does not mean it will have finished by that point. It isn't so much that it works on the second time but that by the time you mouseover again the AJAX from the first time has finished. Try it: mouseover, then out, then over, on the same element quickly. And every time you mouseover before the AJAX has completed, another one will start up. You might also be able to keep your mouse over the element and it'll eventually show. Depends on the popup code. Likely not. Render the popup HTML ahead of time instead of starting with an empty string and filling it through AJAX.
  4. Don't worry about the timezone_type. It's a "military timezone" because they use single letters to identify UTC offsets. Supposedly. https://en.wikipedia.org/wiki/List_of_military_time_zones Z === UTC. But it's such a convenient symbol that just about everybody else uses it too.
  5. It's really quite simple. Object goes on the left, name of the thing you want goes on the right. https://www.php.net/manual/en/language.oop5.properties.php
  6. Alter the column so that it uses a numeric data type instead of a string data type.
  7. Are you familiar with objects? Seen the -> operator?
  8. object(ATWS\AutotaskObjects\QueryResponse)[9] public 'queryResult' => object(ATWS\AutotaskObjects\ATWSResponse)[10] public 'EntityReturnInfoResults' => object(ATWS\AutotaskObjects\ArrayOfEntityReturnInfo)[1028] public 'EntityReturnInfo' => array (size=500) ... 1. Whatever you dumped was a QueryResponse object. 2. It has a property named "queryResult" which is a ATWSResponse. 3. It has a property named "EntityReturnInfoResults" which is an ArrayOfEntityReturnInfo object. 4. It has a property named "EntityReturnInfo" which is an array of something.
  9. Not sure what you're missing yet but I can tell you what we're missing: code.
  10. slider.php: SELECT * FROM haberlerekle ORDER BY haberekle_id DESC LIMIT 12 mansethaberler.php: SELECT * FROM haberlerekle ORDER BY haberekle_id
  11. $result = json_decode($response); $students = $result->data; Whatever $response was, it was not valid JSON. Find out what it was.
  12. I don't think you understand me. You can write the Javascript, yes? I sure hope so because that's a rather important aspect to the problem you're describing. I'm not saying you don't write Javascript. I'm saying you don't write Javascript that tries to manipulate the element's style. I'm saying you do write Javascript that adds/removes CSS classes from some appropriate ancestor element, then handle the appearance changes with a CSS rule.
  13. I don't yet understand what you want mansethaberler.php to do. You need to describe what the page is supposed show. I know that slider.php has a link and that you are clicking the link to go to mansethaberler.php, but I don't know what you want that page to do.
  14. Do you want mansethaberler.php to show only one headline? According to the link you clicked? Or to show all of them but show the one from the link first (and the user can see others)?
  15. What problem are you having trying to do that? Isn't that the same thing that slider.php is already doing? Just copy that.
  16. Actually you can create a view with a subquery. But you shouldn't for this. Relying on GROUP BY as a way to choose distinct rows is a MySQL quirk. So you're storing coach information alongside the school? What happens when the coach changes? Do you duplicate all the other school information into a new row? Why aren't you storing school information in one place and school coaches in another?
  17. If you're outputting multiple addPostCode()s then that part is right. Next place to look would be inside that function...
  18. Manipulating appearance like this is a pain. You know what's easier? Applying a class to an appropriate container ancestor and using CSS rules.
  19. You put the $mig_postcode in the loop. You didn't put the addPostCode in the loop too.
  20. Methods are code so there's nothing to persist there. Data can be serialized. Do try to serialize the data and not the object though - more portable and less dependent on your PHP. Depends on the nature of the process. I don't have the answers to this one. All sorts of concerns, yeah. Such as the fact that you only have the one cookie so that means you get only the one key. The key should be enough information to uniquely identify the data. Same key means the same data, though the same data could hypothetically exist under multiple keys. If you wanted to cache the result of finding the 100th Fibonacci number then "fibonacci_100" would be a good cache key. If you have to. Polling as a whole sucks. If it takes code to make the object available then that same code should be able to (somehow) notify a client. If there's no way to notify a client then give them expected/retry time periods (eg, "not available yet, try again at X time") based on some reasonably intelligent estimates.
  21. That's not very good table design, but whatever. You're running a second query to get totals, right? Have the query return a count of rows too. (So AL has 10 rows, AR has 5, and so on.) Before your loop, start a counter at 0. Increment the counter every time you print a row. When that counter reaches the number of rows the state has, print out a separate <tr> row with the information you want. Then reset the counter to 0 for the next state's rows.
  22. Then put it echo "<tr><td>" . $row['cmlstate']."</td>"; inside the table cell. Stick the <br> and $row[whatever] values in there.
  23. Repeating your question for the fourth time does not answer mine. Do you want to put the total inside the table cell?
×
×
  • 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.