Jump to content


gizmola

Member Since 06 May 2003
Offline Last Active Jul 21 2016 11:45 PM

Posts I've Made

In Topic: Software to read thoughts and convert to type

28 June 2016 - 03:36 AM

I've been typing for way too long. Took my first typing class in 7th grade, so about 35 years ago. Maybe someday instead of keyboards we can just put on our typing helmets and get to work :)


You'd probably be surprised how many people use text-to-speech and dictate their written material. I think it would be very tough to make that work for coding though.

In Topic: Is it possible to do these things?

28 June 2016 - 03:34 AM

These questions have nothing to do with php do they? I'm moving your question to the javascript subboard.

As far as opening a new window vs. a tab. that is behavior that is controlled by the browser, but essentially, you are using the correct technique, in specifying that the target be "_blank".

Use firebug or some similar browser javascript debugger to see what is going wrong.


I'm not really sure what you are trying to do with Question 2. Please elaborate with an example.

In Topic: delete all but latest 6 rows

27 June 2016 - 11:02 PM

I tested my query before posting - it does work. Provided it is unique, you can substitute the timestamp for the id.


Hey Barand,
My comment was addressed to the original post, not to your answer. I actually didn't see your answer until after I had posted --- we were posting at approximately the same time I guess.

In Topic: delete all but latest 6 rows

26 June 2016 - 05:18 PM

MySQL has lots of limitations that it seems you can often simply trick the engine and get around in some other way.

Your approach won't work because you can't use a correlated subquery of the same table you are trying to DELETE from.

However, hiding this inside nested subqueries lets you get around this issue.

DELETE FROM benchmarks
  WHERE timestamp <= (
    SELECT timestamp
    FROM (
      SELECT timestamp
      FROM benchmarks
      ORDER BY timestamp DESC
      LIMIT 1 OFFSET 6 
    ) balias
  )

In Topic: PHP hierarchical MVC design from scratch?

22 June 2016 - 11:45 PM

I agree with Jacques. I was going to suggest you take a look at Symfony's routing component as an example: http://symfony.com/d...rk/routing.html