mysql select from multi tables problem
Posted
by moustafa
on Stack Overflow
See other posts from Stack Overflow
or by moustafa
Published on 2010-06-15T05:54:41Z
Indexed on
2010/06/15
6:02 UTC
Read the original article
Hit count: 190
mysql
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...
© Stack Overflow or respective owner