[wp-hackers] Re: Coding Projects

Thiago Becker thiago.becker at gmail.com
Tue Dec 14 16:04:05 UTC 2004


Acctually, #3 is a BIG hit in the preformance of the database;
dreating a new table each time a query is made is hard for the query.
#2 is what I'll be using.
The (one shot) query should be
SELECT p.ID as id_post, * FROM posts wp_posts p, wp_post2cat p2c WHERE
<begin loop> $cat_id (NOT) IN (SELECT category_id FROM wp_post2cat
WHERE post_id = id_post) <end loop>;

This is quite correct, maybe with wrong syntax, but you can get the
idea. This is impossible for our user base, since the minimum
requirement is mysql 2.23, that don't support nesting subqueries.
If you can do this with joins, thats cool, show me how and I can do it
on our code.

[s]
Thiago

On Tue, 14 Dec 2004 07:00:41 -0600, Ing. Moises Kirsch
<moikirsch at gmail.com> wrote:
> Could you post the query (with the sub query) maybe I can help you
> build it using joins or they might be someone else who knows more in
> SQL and can help out.
> 
> Moi
> 
> --
> Moises Kirsch <moi(at)kirsch.com.mx>
> Never underestimate the power of stupid people in large groups.
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
===================================
Thiago Rafael Becker
Computer Science Undergraduate
thiago.becker at gmail.com
===================================



More information about the hackers mailing list