Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.