w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
cannot bind LIMIT value within table result set of a statement

The knack you need is this:

Anywhere you can say table in SELECT ... FROM table AS t you can also say

 SELECT ...
   FROM (
         /* some valid query */
         ) AS t

So you need

  SELECT ...
    FROM (
          SELECT * FROM computers ORDER BY computer_id ASC LIMIT 0,?
          ) AS t
    LEFT JOIN  (whatever)

That is, you can either name a physical table, or a virtual table (the result set of a query) anywhere you name a table.

That's why Structured Query Language is called Structured.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.