mysql select from multi tables problem
- by moustafa
this is the query
SELECT
members.memberID,
members.salutation,
members.firstName,
members.middleName,
members.lastName,
members.suffix,
members.company,
addresses.address1,
addresses.address2,
addresses.city,
addresses.state,
addresses.postalCode,
addresses.country,
addresses.memberID,
email.email,
email.memberID,
phonenumbers.phoneNumber,
phonenumbers.memberId,
subscriptions.year,
subscriptions.memberID
FROM
members,
addresses,
email,
phonenumbers,
subscriptions
WHERE
subscriptions.year = '%s'
AND
subscriptions.memberID = members.memberID
AND
subscriptions.memberID = addresses.memberID
AND
subscriptions.memberID = email.memberID
AND
subscriptions.memberID = phonenumbers.memberID
ORDER BY
members.lastName,
members.firstName,
members.company
LIMIT 0, 10
my problem is its a huge query so Im trying to limit it to so many at a time... its supposed to have over 5000 results... anyway the only limit that works is limit 0, 10 if you do anything else 5, 10 it doesnt work 0, 50 doesnt work... only 0, 10 works...
and when I do 0, 10 the query returns blake firstName, middleName, lastName, and a few others... and when I do a print_r() on the $result it shows them blank as well and there is most def data in the database and there is also no typos for that...