Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    3
    Thanked 0 Times in 0 Posts

    combining php and sql

    Hi

    I've got a simple sql statement for a database query but I want the records to be limited by and starting from values that change each time.

    Creating the values in my php is fine ......I have them held in these two variables

    $limiter // obviously the limit value
    $start_point // obviously the start point

    How do I add these to my sql statement?

    I've tried doing this but it doesn't work

    "SELECT name,words FROM dialogues WHERE conference_id = '$id' LIMIT ".$start_point.", ".$limiter;

    Any ideas?

  • #2
    New Coder
    Join Date
    Oct 2006
    Posts
    82
    Thanks
    3
    Thanked 0 Times in 0 Posts
    try...

    PHP Code:

    "SELECT name,words FROM dialogues WHERE conference_id = '$id' LIMIT '$start_point', '$limiter'"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •