PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WEBDEV 2024
→
Limit issue in query
Limit issue in query
Started by Mister RUAN, Sep., 11 2017 3:24 PM - No answer
Connect yourself…
Mister RUAN
#1
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
Report
0
0
→ Go back to WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text