...

View Full Version : combining php and sql



juanc
11-07-2006, 06:00 PM
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?

littlejones
11-07-2006, 09:00 PM
try...




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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum