Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: Limit list

  1. #1
    Junior Member
    Join Date
    Jun 2018
    Posts
    10
    Member #
    59288

    Limit list

    I need to put a limit to the display of the table - the number of users. When I put limit count (ID_User), I get an error. How will it be more correct to write this?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,688
    Member #
    5580
    Liked
    717 times
    I'm not sure if you mean to limit the number of users displayed?
    I don't understand why you need to use "count", but maybe you need to rephrase the question?

    Select the fields you need to display.
    Order by ID_User (ascending or descending).
    Limit the rows to the first 15 ...

    $query="
    SELECT
    ID_User,
    username,
    useraddress
    FROM
    customers
    ORDER BY
    ID_User DESC
    LIMIT 15
    ";
    Last edited by mlseim; Jun 19th, 2018 at 07:09 PM.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:12 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com