pixeleet
pixeleet•5mo ago

mismatched script arguments?

Error during execution An error occured, please contact the app author. error during execution of the script: expected 1 parameters but got 2
No description
6 Replies
rubenf
rubenf•5mo ago
there is not enough information in what you're showing show the actual run from the Debug Runs, you will have the args and query there
pixeleet
pixeleet•5mo ago
select
h.id,
h.name,
h.address,
h.city,
count(hv.hotel_id),
h.created_at,
h.updated_at
from hotels h
left join hotel_videos hv on h.id = hv.hotel_id
where provider != 'AIRBNB'
and h.deleted_at is null
and city = $1
and hv.url is not null
and name ilike '%$2%'
group by h.id
select
h.id,
h.name,
h.address,
h.city,
count(hv.hotel_id),
h.created_at,
h.updated_at
from hotels h
left join hotel_videos hv on h.id = hv.hotel_id
where provider != 'AIRBNB'
and h.deleted_at is null
and city = $1
and hv.url is not null
and name ilike '%$2%'
group by h.id
pixeleet
pixeleet•5mo ago
No description
pixeleet
pixeleet•5mo ago
There is clearly 2 params, I'm passing them, I'm not entirely sure where is the misunderstanding between me and wmill 😛 the funny part is this was working perfectly fine friday D:
rubenf
rubenf•5mo ago
your query is wrong and so no since friday you've changed the query and the error message is correct, you're passing 2 parameters but your query is using only one and name ilike '%$2%' that's not doing what you think it is doing
pixeleet
pixeleet•5mo ago
okay so what's the correct way to write that?