Jump to content

requinix

Administrators
  • Posts

    15,288
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. Not what I'm saying. What if you go to https://www.mysite.net/ota/delete_ESP_data.php?file=delete_ESP_data.php
  2. What's the name of your PHP file? Let's pretend it's get.php. What do you see if you go to /get.php?file=get.php
  3. Variables defined outside of functions are not available inside of functions. If you didn't see PHP give you a warning about that then you probably do not have your environment set up properly for PHP development. Find your php.ini and set display_errors = on error_reporting = -1 Then restart PHP and/or your web server and try your script again.
  4. Didn't notice this thread earlier. If you didn't see the answer elsewhere, there were problems with Elasticsearch staying alive: kernel kept killing it due to memory problems. Then a reindex or two. Everything seems fine and stable now.
  5. Looks fine to me. Is the problem your browser?
  6. Something about your assumption is wrong because both messages are definitely indicating that $table is not defined. You can test it really easily: define $table as an empty array before the loop and see what happens.
  7. I get you're trying to figure this out, but using "global" variables and "variables variables" (the name for this double-$ stuff) is not a good idea. They are bad features of PHP and you should do everything you can to avoid using them.
  8. I hate the ligatures. Especially the ≤ and triple ═══. I'd have to relearn how to scan code.
  9. You need the value of #txtSearch at the time the button is clicked, not when the page loads. And if you're going to be putting arbitrary values into the URL then you need to use a function like encodeURIComponent for it.
  10. Have you tried a query that lists all the columns and requires any of the conditions?
  11. You say you don't want to use CSS, but then you do things like <div class="col-2" style="top:-15px; left:-20px;"> and <div class="col-6 text-justify" style="position: absolute;height: 68px;left: 22%;right: 27.05%;"> which is very much the opposite of that. If you are going to use Bootstrap for positioning then do not do your own positioning. Work with the system, not against it.
  12. If you also wanted permissions on some sort of "container" then you've basically discovered the Unix permissions system. Can you say that, for each permission, "if public can do X then owner and group can" as well as "if owner can do Y then group can"? If so then you have a hierarchy-based model and your system needs only know the lowest level in the hierarchy to permit the action - the second example you have. If not then you probably have a role-based model and you'll likely end up granting individual permissions to each group - the first example. In other words, first you need to know at a high "business" level what the permissions system must be capable of supporting: how people and groups relate to each other. If it isn't clear what that needs to look like, consider looking at existing permissions systems (which are mostly hierarchy- or role-based), see which seems most appropriate, and copy it.
  13. It's not stupid. Not by much. My version looks almost the same: opening parenthesis, capturing group, some ungreedy amount of stuff that isn't an opening or closing parenthesis (you used an assertion instead), the word "required", and the closing parenthesis. If you absolutely can't stand having a $1 group, swap the opening and closing parentheses for assertions. But this will make it look more "obtuse". If you care about squeezing every bit of performance out of this regex then we can keep going, but with short input strings I'd need a pretty darn good reason to put in the effort.
  14. Can you write something that captures the word "required" through to the closing parenthesis? What do you know about the input $string. Does it always have the word? Is it always going to be contained in parentheses? What if it shows up multiple times?
  15. What "wrap"? DIVs have no inherent meaning and contribute nothing to structure. Default CSS rules aside, their sole purpose is to allow you to group elements together under a single parent, and thus apply CSS or behavior to the whole group as a unit.
  16. As long as the exception is being handled somewhere and the user is getting a generic error page, you're probably okay. But you should still take steps to prevent whatever bad data reached Symfony's code from getting there. Like in whatever uses that get_quote_vehicle_select view.
  17. Is "${ip}:${port}" literally what is there? Because that's obviously not a valid host. Or valid Host header. Or valid URL to give to curl. And I imagine it would only happen because of a rather glaring error in some code somewhere.
  18. A box-shadow draws a shadow behind the element's box, which is always rectangular. And there is no "radius" - only border-radius. If the unrounded corners on the shadow are a problem then you can apply a matching border radius to the parent element so that it will crop the corners of the shadow.
  19. Uh... margin, maybe? Or maybe you're putting your CSS on the wrong elements? Throw what you have into a jsfiddle, make it reproduce the problem you're seeing, and then we'll have a common place to start talking. Because posting a bit of HTML and a couple attempts at CSS applied... well, somewhere, isn't really great.
  20. Great, but if you want years then you'll need the /365. And think about whether you want to round 2.5 years of experience up to 3 or not - because that's what a ROUND() would do. That gives you the ID and the average experience. If you want to only return IDs that have enough experience, add a HAVING clause to your query: ...HAVING Days >= 1095 /* or, if you /365 and alias the value as Years, */ ...HAVING Years >= 3 I assume you also want the first and last names? JOIN in the employees table based on the ID and you should be set.
  21. So "average years of experience per company worked for". Just so we're clear here what it is you're averaging. Because average is about a ratio: some number per some other number. You have a query that can give you the average for an employee. Your first step should be to adapt that so you can see all employees and their averages. You've somewhat done that in your second query except you added a bunch of other stuff to it which may or may not be useful. So back up a step. Can you write a query that just gives you the (let's say) eemp_id and the AVG(...) of their work experience? It should look very similar to the first query.
  22. Where's the part of your post where you describe the problem?
  23. https://www.google.com/search?q=site%3Aforums.phpfreaks.com+css+wrapper+container+width+height ?
  24. is_subclass_of, which continues the tradition of some things using the word "class" to represent interfaces too.
×
×
  • 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.