Avatar of Member_2_5230414
Member_2_5230414
 asked on

MYQSLI help with limit

Hi,

Im using Mysqli and im trying to limit the results by 10 and order them from last to first from the database.

$sqlhorses = "SELECT Place FROM `*` WHERE `Horse` ='".$db->real_escape_string($row['horse']). "'";

Open in new window


the above works but when i added the limit 6 to the end it shows errors.

Can anyone help?
PHPMySQL Server

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Member_2_5230414

ASKER
Perfect thanks.... i just added * to limit the amount of my table structure im sharing
Ray Paseur

Thanks for the points - glad you've got it pointed in the right direction! ~Ray
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck