Jump to content

kwmlr439

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/281032-php-mysql/
Share on other sites

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
Link to comment
https://forums.phpfreaks.com/topic/281032-php-mysql/#findComment-1444367
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.