Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5534

thorakmedichi on "Complex query failing with $wpdb->query but work directly in phpMyAdmin"

$
0
0

So it turns out that even though I am creating a TEMPORARY table wordpress will store those results for a period of time. Therefore doing something as simple as this:

$SQL1 = "CREATE TEMPORARY [...] LIMIT 0, 500";
$SQL2 = "SELECT *, ROUND[...] LIMIT 0, 200";

$wbdb->query($SQL1);
$wbdb->query($SQL2);

Will work.


Viewing all articles
Browse latest Browse all 5534

Latest Images

Trending Articles



Latest Images