Extension, Module

Archived
Forum
(read-only)

Rein de Vries does not actively monitor this forum
(but you can still get help from other EE users).


For official support, visit the official support site »

Webservice

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

You must be logged in to post.

SQL error searching entries

Bug Report

jjustice
jjustice

I’m attempting to do a simple read_entry query:

(expressionengine.dev points to my local server)

http://expressionengine.dev/webservice/rest/search_entry/json?data[entry_id]=13&auth;[api_key]=REMOVED

I get the following SQL error:

SQLSTATE[HY000]General error3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'expressionengine-sandbox.wt.entry_date' which is not in SELECT list; this is incompatible with DISTINCT:<br>
SELECT distinct(wt.entry_id)
  
FROM exp_channel_titles AS wt
  LEFT JOIN exp_channel_data 
AS wd
   ON wt
.entry_id wd.entry_id
  LEFT JOIN exp_channels 
AS wl
   ON wt
.channel_id wl.channel_id
  WHERE 
(wl.channel_id IN(2,3,4) AND (wt.site_id AND wd.site_id AND wl.site_id 1) )
AND ( 
wt.entry_id '13' ORDER BY wt.entry_date DESC 

I’m using PHP 7.0.3, mysqlnd 5.0.12-dev, mysql Ver 14.14 Distrib 5.7.11, EE 3.3.4.

Thanks for any help you can provide!

Reinos
# 1
Developer
Reinos

Hi There,

can you lower your specs on you dev machine, does that work?

jjustice
# 2
jjustice

When you mean lowering the specs, do you mean lowering some of the versions of the dependent software? Which in particular would you recommend looking into? I’m using an off-the-shelf Vagrant box, so I might have to do some work to build up a custom one instead.

Reinos
# 3
Developer
Reinos

never mind, just test it with PHP 7.0.8.

Are you using MySQL strict mode?