Ajax refresh lookup with 2 differents field

Hello, i need your help.

Have you already succeed in using an auto lookup refresh (A list box refresh a second listbox) with ajax with two differents source field from the form
The lookup works very well :

SELECT idchantier, libellechantier
FROM chantier
WHERE idclient=’{idclient}’
AND actif=‘1’

This one, also very well :

SELECT idchantier, libellechantier
FROM chantier
WHERE idclient=’{idclient}’
AND actif=‘1’
AND ((datedebut<=now() AND datefin>=now()) OR permanent=‘1’)

But this one with 3 differents fields failed :
SELECT idchantier, libellechantier
FROM chantier
WHERE idclient=’{idclient}
AND actif=‘1’
AND ((datedebut<=’{startdate}’ AND datefin>=’{enddate}’) OR permanent=‘1’)

As soon as my lookup contains several diffrents fields, the ajax call doesn’t send any request to my mysql database.

Any idea or advise ?

try doing some things: [LIST=1]

  • if you echo the {startdate} and {enddate} what is the format of the date values?
  • try replacing the startdate by a value like 2019-10-01 and see what happens [/LIST]
  • ONe more thing, shouldnt your startdatt be >= datedebut?