PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 2024 → Limit issue in query
Limit issue in query
Started by Mister RUAN, Sep., 11 2017 3:24 PM - No answer
Registered member
208 messages
Popularité : +1 (1 vote)
Posted on September, 11 2017 - 3:24 PM
Good day.

I have a problem with the query inside Webdev PHP. I created a query with multiple parameters where the some of the parameters is in the LIMIT function. If I add the Limit with start line and return lines it works 100% but if I add the parameters it does not pass the parameters through and returns all the lines in the table.

Works:
SELECT
codes.code AS code,
codes.itemname AS itemname,
codes.brand_code AS brand_code,
codes.brand AS brand,
codes.registration_country_iso_code AS registration_country_iso_code,
codes.ItemDescription_Prefix AS ItemDescription_Prefix,
codes.code_Prefix AS code_prefix
FROM
barcodes
WHERE
barcodes.registration_country_iso_code = {Paramregistration_country_iso_code}
AND barcodes.ItemDescription_Prefix = {ParamItemDescription_Prefix}
LIMIT 1, 5;


Dont's pass:

SELECT
codes.code AS code,
codes.itemname AS itemname,
codes.brand_code AS brand_code,
codes.brand AS brand,
codes.registration_country_iso_code AS registration_country_iso_code,
codes.ItemDescription_Prefix AS ItemDescription_Prefix,
codes.code_Prefix AS code_prefix
FROM
barcodes
WHERE
barcodes.registration_country_iso_code = {Paramregistration_country_iso_code}
AND barcodes.ItemDescription_Prefix = {ParamItemDescription_Prefix}
LIMIT {ParamStartRecord}, {ParamLines};


Why would it not pass the parameters?

Thanks

Ruan
Message modified, September, 11 2017 - 3:25 PM