-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
1. You cannot output JSON and then go on to output a bunch of HTML. 2. What happens if the productid doesn't match anything?
-
You could help yourself by sorting the array (or sorting a copy of the array) according to subarray size, then only searching arrays that are at least as large as the one you're processing. Improving efficiency much beyond that will probably result in some non-trivial code that's not really worth it for just 12 subarrays.
-
I'm not prepared to go through 20 minutes of video to find what you're talking about. RewriteCond %{REQUEST_FILENAME} !-d That makes sure the next RewriteRule only affects URLs that weren't for a directory. RewriteCond %{REQUEST_FILENAME}\.php -f That makes sure that the next RewriteRule only affects URLs that exist if you were to take the path and add a .php extension. /view/inbox is not a directory (good) but /view/inbox.php does not exist. So there will be no rewriting. That second RewriteCond is the problem. Check the docs to see what it needs to look like so that it instead makes sure to only affect URLs that aren't for a file. Hint: it almost identical to the one about directories. When that's fixed, spend a moment to learn about regular expressions in Apache's URL rewriting, then take a closer look at what your RewriteRule is doing.
-
It seems like you're mixing two different URL rewriting schemes together: the normal version where you look for files that don't exist, and an alternative version where you automatically add a .php extension. Use one or the another. Not both. In your case you are not adding the extension automatically because the URL is like /view/inbox and you don't have a /view/inbox.php script. So replace that second RewriteCond with one that ensures the REQUEST_FILENAME is not an existing file. Then you'll have another problem. Make your script print out $page and you should be able to see what's wrong fairly quickly.
-
Excerpts - Pull content into column, 100 characters max
requinix replied to jenniferabel's topic in PHP Coding Help
Have you considered that maybe the problem that should be solved is the one where it wasn't displaying the excerpt? What code did you have for that, and given that it was not displaying then what was it doing? -
trying to split a list of text into 3 variables
requinix replied to boyjarv's topic in PHP Coding Help
I know. -
trying to split a list of text into 3 variables
requinix replied to boyjarv's topic in PHP Coding Help
Actually I was hoping for the HTML markup. Not how your browser is displaying it to you. Do a View Source. -
trying to split a list of text into 3 variables
requinix replied to boyjarv's topic in PHP Coding Help
You're parsing HTML as text. Don't do that. What's the actual HTML markup for the stuff you're reading? -
Too magical. For each page where you care about this, call a function with an identifier for the page. I don't mean "home.php" or "admins.php". I mean like "home" or "admin" or whatever label you want. The function grabs the rank from the session and looks it up in the database. With a query. And reacts accordingly.
-
add redirect to specific URL to submit button
requinix replied to Faisal777's topic in PHP Coding Help
Make the redirect happen in your PHP. -
change input NaN in non-chromium Edge browsers
requinix replied to jodunno's topic in Javascript Help
I don't see where MySlider is defined. What's your complete code now? -
If you don't care about other records once there's a status_id of 3 then why does the department matter?
-
So I guess what you're saying is that the dept_code is irrelevant?
-
No. Only the pd+chk pair check for the dept_code. But you are not looking at the pd+chk data. You are looking at the pd+ps data. Put the WHERE back in and make the chk join a LEFT JOIN.
-
Look at the condition again. Are you using the right columns for everything?
-
Why are you preloading two different URLs? That don't match what you're using for the IFRAME?
-
1. Look at the second JOIN. Does the condition have anything to do with the table it's trying to pull in? 2. You cannot compare anything to NULL. The result will always be NULL. That's how it works. If you want to know whether something is null then you should be using IS NULL.
-
1. The second JOIN looks just like the first one, has all the same conditions, plus it looks for dept_core and status_id. The whole point is to find "matching" (whatever that means to you) production_status that also meet your exclusion criteria. 2. Forget the WHERE NOT EXISTS. Get rid of it. Instead you need a WHERE to make sure that the second production_status, which you should give an alias, did not match - the easiest method for that being to test that a non-nullable column was null.
-
Do your query like you would normally do if it didn't have that condition. I don't know if you want that JOIN to be LEFT or not. Then add another LEFT JOIN to production_status like you'll already have, except it has the additional conditions for the dept_code and status_id. So the join will attempt to find matching records in the table. Then add a WHERE so that you only include rows when the second JOIN didn't find anything.
-
Are you trying to exclude rows from production_data that have any 13/3 rows in production_status? Or just not include the 13/3 rows in the results?
-
Fails with what message? What "doesn't work" and exactly what does "breaks CSS" mean?
-
colors in python without library
requinix replied to ramiwahdan's topic in Other Programming Languages
Depending on your terminal, yes. -
You said you took the FL if statement out. You did not post that version. But it's not as important as posting the code that is calling this function.
-
Post your modified function as well, as the code calling the function and any other code that could possibly be relevant to your problem.