« first day (3703 days earlier)      last day (1250 days later) » 
00:00 - 22:0022:00 - 00:00

10:02 PM
Yes :) I tried this but I added % just in the beginning. But it's working only when the value is Platná. When the value is 0 it is behaving like the value is % so I get both values
 
This database does not look normalized. You are going to have other problems with fetching the data from it. You should spend some time getting to know SQL and think about a better design.
 
10:15 PM
What normalized?
I don't need better design for now. This is urgent and I have this done ASAP
 
Words like urgent and ASAP are not very suitable for programming. You want to take your time and do it as best as you can. If you do something fast then it will be riddled with bugs and unmaintainable later.
 
Yes I know :/ But this needs to be done at least on temporary mode
Please help me :( This is last thing
 
I'm sorry, I am out. I tried to understand it but I still don't know what you want this code to do. Maybe someone else can help you in this room
 
When the value of the variable is % I need rows that have both values to be displayed. When certain value is set I need rows that have this one value.
 
They all have values
I don't see any of them having NULL
 
10:29 PM
So what can be problem then? I don't understand
 
Same here
 
Anybody?
 
The two columns have values. Some of them have "Nie", "0" or some other string but they all have a value. None of them are empty
 
It's weird
 
% means anything in SQL. So it matches both columns.
What's weird
 
10:32 PM
When %0% throws exactly what %
 
Against which values are you matching %0%?
 
@luxx: welcome.
Not so sure if PDO::ATTR_EMULATE_PREPARES => FALSE works for LIMIT ?.
 
I think it should, it's a value
 
Redesigning part of an internal site. Wondering something... would it be a bad practice to have a table in the database that would have each module I have created listed and a 1 or 0 representing whether the module is active...
 
Doesn't work for keywords but pretty sure native prepares work with limit
I haven't mysql'd in a long time tho
 
10:36 PM
This would allow an easy way for me to change the module to 0 if I want to take that part of the site down for maintenance.
 
err would be LIKE ? - maybe ok.
LIMIT is a value for sure.
 
Like is definitely fine
 
There would be an if condition at the top of the page that would basically check to see if the setting was 1 or 0. If it is a 0 it would give them a maintenance page. Just thinking of something simpler than modifying the ini file.
 
WHERE most likely not on NULL columns. - if that is in an issue @luxx
 
@DaveRandom probably depends on the version of MySQL
but I haven't dug that far into what syntax in prepared statements is supported natively in MySQL in which version
 
Wes
10:38 PM
\o
 
I think I remember doing that way back in the day I used to used myself which was like 5.5
 
@hakre It should. I don't see why not
 
@StatikStasis the question is one of fragility... are you comfortable relying on a database connection in order to make basic decisions at the top of the page like that
No opinion either way from me btw
 
@Dharman the once upon a time kind of thing (ERR_TOO_MANY_LEGACY_SYSTEMS), this is not with emulated prepares, so it depends on the server (not PDO).
 
You could just use postgres btw and not worry about it
/hides
 
10:41 PM
@DaveRandom if there is a sane fall-back in case the database refuses to connect or connection breaks down while rendering ... .
 
Indeed
 
@hakre I just tested it and it works only with native prepared statements.
 
@Dharman that kind of surprises me (positively). thanks for sharing.
 
It's what I would expect, since the emulated prepares are very "buggy"
 
@hakre @StatikStasis ...however this imaginary platform which makes a sane decision on what to load in the absence of a database sounds quite complex...
(But not impossible)
 
10:43 PM
every layer of indirection ....
 
Wes
does anyone know what's "isolated world" from CSP
 
@Wes what do you mean?
Isn't CSP pretty successful/effective?
 
Oh I am lost right now in so many messages
 
@luxx: you still there? /E: haha
could you figure out more?
 
yes :D I just went on toilet :D
 
10:46 PM
toilet is a nice place to get new ideas.
 
I always get shitty ideas on the toilet
4
 
XD
okay so what should I do now :( cause I am lost really :/
 
@Dharman ...
 
gchrome extensions manifest v3 have it: https://developer.chrome.com/extensions/migrating_to_manifest_v3
maybe mozilla has not updated their docs for their manifest?
@luxx bring me up speed, what was it where you got lost?
 
Wes
10:51 PM
i am dubious on what's it for, but again i know basically nothing about CSP
 
@hakre here? when you write to me welcome
 
Wes
will leave it for now :B
 
@luxx so you got all your bases running fine?
 
what do you mean by bases?
 
@luxx me was joining the party late.
where are you stuck?
 
10:53 PM
Will you be here in like 15 minutes? Cause I need to move from point A to point B
 
@luxx don't ask to ask. just ping me. ttyl.
 
Okay
 
Take your time.
 
@Wes where this message ?
 
Wes
?
 
11:06 PM
refer to your question: does anyone know what's "isolated world" from CSP
I think this
http://sirdarckcat.blogspot.com/2017/01/fighting-xss-with-isolated-scripts.html
btw this test PASS so I will open a pr

--TEST--
Bug #74371: strip_tags strip >< in attributes with allow tag
--FILE--
<?php

echo strip_tags('<ta alt="x< " >', '<ta>').PHP_EOL;
echo strip_tags('<ta alt="x> " >', '<ta>').PHP_EOL;

?>
--EXPECT--
<ta alt="x&lt; " >
<ta alt="x&gt; " >
but the bug number isn't correct, because this problem is still present in PHP 8,
So first create issue of this bug then PR?
 
@hakre
 
@luxx @luxx
 
When the value of the variable is % I need rows that have both values to be displayed. When a certain value is set I need rows that have this one value.
it's working only when the value is Platná. When the value is 0 it is behaving like the value is % so I get both values
@hakre are you there? :)
 
11:29 PM
@luxx: one question in the middle: are you using phpstorm by chance?
 
nope
 
please consider to use strict comparisons ("===") instead of weak ones ("==").
not sure if this is the issue here, but this is generally useful for starters with PHP.
 
Okay I'll try now
 
and if you consider using using phpstorm, install the ea inspections extension. just saying.
 
i am using visual studio code
is phpstorm better?
 
11:33 PM
yes
by leaps and bounds for PHP
 
so should I definitely switch right? I am open free to suggestions.
 
@luxx your decision.
not that I couldn't strongly recommend phpstorm, but you might prefer to spend data to microsoft instead of buying a license from a more decent company ...
as editor I use geany on the desktop and vim in the shell.
but this is all about personal preference.
 
So I tried to use ("===") but nothing happened
 
@luxx as said, it's likely not related, but good to know you changed this. let me take another look.
 
hi
I have a view which created by inner join multiple tables, it's need to insert additional values in additional cols should I create another table and join it with this view
 
11:46 PM
@luxx empty will return on "0" true: 3v4l.org/BuEkn
does this solve your issue?
 
I don't quite understand. What should I do? Sorry I am new you know
 
@luxx sure, the if clauses on top contain empty() checks. you spot those?
 
yes
 
@luxx for example if(empty($_POST['tachograf'])){ $tachograf = "%";}
 
@DaveRandom If the database connection fails- then the point is moot either way. So many other things wouldn't work. Hmm... it was just a thought. I was thinking it might be an easy way to put part of the site in maintenance mode.
 
11:52 PM
as it comes before elseif($_POST['tachograf'] === "0"){ $tachograf = "%0%";} (in the if clause line-up), this later else-if one is never branched into, as the earlier empty() check is already true.
(sort of) basic if / else-if / else branching logic. the first one wins.
 
But when it's not empty the value of $tachograf should by either this or this rigt?
 
@luxx well when the value is "0" it is empty.
 
So should I change this other 0 value to for example string "No"
 
empty() gives you a lot of features. So yes, the example string "No" is more expressive for that.
 
Okay I am going to change it a let you know
 
11:57 PM
background: when a form value is coming in via HTTP it's hard to say whether it is a number or a string (character sequence). Therefore empty() checks for both no-set, string and number cases.
Making the string explicit a string (not a number) makes your protocol more distinct.
 
Understood
 
Alternative here: check with isset() - tells you exactly if the form value was there. Then check with the else-if for "0" but also add an else clause at the very end to treat all other fall-throughs.
 
00:00 - 22:0022:00 - 00:00

« first day (3703 days earlier)      last day (1250 days later) »