kwmlr439 Posted August 11, 2013 Share Posted August 11, 2013 Hello: Any PHP MYSQL experts out there willing to help? I would greatly appreciate it. I built a web directory using WordPress Platform and I am trying to PULL data from my database and display it on the home page. I have the following code: $sql = "SELECT * FROM `agents` LIMIT 0, 30 "; I know this isn't much to work with but I am happy to answer any question related to my tables. Regards, John. Quote Link to comment https://forums.phpfreaks.com/topic/281032-php-mysql/ Share on other sites More sharing options...
thara Posted August 11, 2013 Share Posted August 11, 2013 (edited) Dont use SELECT ALL columns and rows from the table, if you don't need all all columns. If you want to query partial data from the table, use a list of comma-separated columns in the SELECT clause. For example, if you want to view only first name, last name and job title of the employees, you use the following query: SELECT lastname, firstname, jobtitle FROM employees Edited August 11, 2013 by thara Quote Link to comment https://forums.phpfreaks.com/topic/281032-php-mysql/#findComment-1444367 Share on other sites More sharing options...
trq Posted August 11, 2013 Share Posted August 11, 2013 Do you have a question? Quote Link to comment https://forums.phpfreaks.com/topic/281032-php-mysql/#findComment-1444377 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.