Archive for March, 2008

Name Chosen

Sunday, March 23rd, 2008

And the name is chosen for the script: PHPBridges is the name (thank you Bruno).

You can find the code at the PHPBridges Launchpad Page.

Going Open Source

Friday, March 21st, 2008

Posts on this blog will be written in English from this point forward with the primary objective of reaching the widest possible audience.

With the development of the necessary functionality for a working TekPT Planet I have decided to license the script under the GNU Lesser General Public License v2.1 and release it to the wild since the only other good alternative for such a script is written in python (Planet Planet).

Still I’ll need some help for this: the script doesn’t have a name yet!

Sure “TekPT Custom Script” worked out great while it was used by a single website but now with the objective of releasing it to the wild it will need a better name. That’s why I’m asking you to tell me in the comments your thoughts on a good name for the script.

Pesquisa

Sunday, March 16th, 2008

Finalmente, depois de bastante tempo sem perceber o que se passava, consegui colocar a pesquisa do TekPT a funcionar de forma aceitável… O código não está bonito, nem nada que se pareça, mas ao menos funciona e não obriga o servidor a uma paragem cardio-respiratória enquanto tenta fazer uma simples pesquisa.

O problema residia na implementação das Sub-Queries no MySQL: ela está inacabada e consequentemente levava minutos a resolver a simples subquery que eu utilizava… A solução rápida passou por pedir apenas os IDs dos posts e consequentemente chama-los um por um no php. O numero de queries feitas aumentou mas o resultado é uma pesquisa muito mais rápida.

O código será reescrito eventualmente mas para já serve. A questão do OR em vez do AND no entanto é outra questão ainda por resolver.

EDIT: Afinal parece que não vai demorar assim tanto. A pesquisa AND está concluida se bem que ainda precisa de muitos testes. Basicamente a solução passou por uma funcionalidade disponível na OracleDB chamada de INTERSECT.

Ao fazer a intersecção entre os resultados de dois SELECT tem-se uma pesquisa AND. Infelizmente este comando não existe no MySQL mas usando INNER JOIN chega-se ao mesmo resultado.

Agora falta mesmo é testar.