Search found 632 matches

by JLA
Sat Dec 19, 2020 4:36 pm
Forum: General Discussion
Topic: Where/How did you learn php?
Replies: 31
Views: 19178

Re: Where/How did you learn php?

Best way to learn is to read the code and see what and how the different pieces work. Rinse and repeat!
by JLA
Fri Nov 13, 2020 5:23 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

Hi there! My little nephew is a bad boy that called me last day, and was really busy, so him assured to take a look before or later... the before or later worry me. I just did a stupid test by the way, and i see into a table like you provided that contain just 5126 rows, a query like your return Sh...
by JLA
Wed Nov 11, 2020 5:17 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

Hi Axe70 - just checking to see if you had a chance to look at this?
by JLA
Fri Nov 06, 2020 1:26 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

axe70 wrote:
Fri Nov 06, 2020 1:24 pm
Ok, JLA, i will find out the time to set it up in short as i can.
Let see before what my nephew say, when and if he will put eyes into ...
Thank You
by JLA
Fri Nov 06, 2020 1:14 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

I'm sorry that JLA have not provided a running ready example of tables to play with. So since i'm not smart enough, and no time to follow, i passed this, for curiosity, to a computer engineer, that i know very well. If there is an answer to this, and he will find out the time to look into, i will r...
by JLA
Thu Nov 05, 2020 9:22 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

Running this query we are seeing a very long execution time of between 8 and 11 seconds for a return of 50 rows. EXPLAIN shows a key len of 2 bytes, which is the size of field1. That means it only uses the first part of the index. If it used all three, it would use 2+1+4 = 7 bytes. Try ANALYZE-ing ...
by JLA
Thu Nov 05, 2020 8:56 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

I really like to work with things under my hand (since not so smart) can so you provide an sql structure dump, may saved via phpmyadmin, that would be so possible to load in seconds as test, and i'll have your same 2 or 3 tables/scenario into a database test? also a dump containing data to load wou...
by JLA
Wed Nov 04, 2020 8:29 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

Brf wrote:
Wed Nov 04, 2020 8:20 pm
I don't know if the sort is fast or slow. Try returning the first 50, rather than the middle, and see if there is a difference.
Yes, returning the 1st or last 50 is instant. Its only the rows that reside in the middle. The closer you get to middle, the longer the query takes
by JLA
Wed Nov 04, 2020 8:14 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

Re: How to handle this query in a better way??

So, if I am reading it correctly... You are reading 22-million rows, sorting them descending, then reading sequentially through 10-million of them before returning 50 rows? Yes, we have a multi-column index (combo1) on column (field1, field9 and field12) Our 1st select asks for the item_numbers (wh...
by JLA
Wed Nov 04, 2020 7:14 pm
Forum: Extension Writers Discussion
Topic: How to handle this query in a better way??
Replies: 22
Views: 1648

How to handle this query in a better way??

Starting with a table that contains over 700 million rows (INNODB MYSQL) Structure of TESTTABLE1 Item_number int(10) auto_increment field1 smallint(8) field2 varchar(250) field3 mediumint(8) field4 int(11) field5 mediumint(8) field6 mediumint(8) field7 tinyint(3) field8 tinyint(1) field9 tinyint(3) ...
by JLA
Wed Oct 21, 2020 6:25 pm
Forum: phpBB Discussion
Topic: Making phpBB more social - what have you bridged with?
Replies: 18
Views: 7162

Re: Making phpBB more social - what have you bridged with?

We've added photo galleries (now 5.3 million posted photos), attachments (now over 143 million attachments) as well as facebook, twitter and pinterest sharing to all posts.
by JLA
Wed Oct 21, 2020 6:22 pm
Forum: Extension Writers Discussion
Topic: PHP Regex quick question
Replies: 54
Views: 4987

Re: PHP Regex quick question

if going on you've find the way to accomplish, that's ok! for this particular regex and when we saw a string that had some unescaped double quotes and single quotes in same string - strange behavior. String was returned as empty - only at the point after this regex. Changed to this other solution a...
by JLA
Wed Oct 14, 2020 8:21 pm
Forum: Extension Writers Discussion
Topic: PHP Regex quick question
Replies: 54
Views: 4987

Re: PHP Regex quick question

Hi everyone - lots of activity on this I see. Sorry for the delay in reply. I am currently testing all the proposed. 1st, a little more info to help clarify the situation. The project I'm working on is for a string that deals with some user input. 1. This input can include at time some https (also ...
by JLA
Sun Oct 11, 2020 12:30 am
Forum: Extension Writers Discussion
Topic: PHP Regex quick question
Replies: 54
Views: 4987

Re: PHP Regex quick question

yes, if i'm not wrong: '/(https?)(:\/\/)(.[^< ]*?)(\.?|\?){1}(\.jpg|\.jpeg|\.gif|\.png|[a-z][\.|=]jpg|[\.|=]jpeg|[\.|=]gif|[\.|=]png){1}/ui' a match need to start with http or https then :\\ then any character, but not a < and nor a space then a dot or a ? and need to be single then .jpg, jpeg, gif...
by JLA
Sat Oct 10, 2020 7:57 pm
Forum: Extension Writers Discussion
Topic: PHP Regex quick question
Replies: 54
Views: 4987

Re: PHP Regex quick question

P.s just re-added something lost during fly tests, that i assume should remain in place, so the complete (at moment) regexp to me is this: $s = preg_match_all('/(https?)(:\/\/)(.[^< ]*?)(\.?|\?){1}(\.jpg|\.jpeg|\.gif|\.png|[a-z][\.|=]jpg|[\.|=]jpeg|[\.|=]gif|[\.|=]png){1}/ui', $string, $matches, PR...

Go to advanced search