Jump to content


Photo

Php, Mysql Script Help Needed


  • Please log in to reply
4 replies to this topic

#1 AbydosGater

AbydosGater
  • Members
  • PipPipPip
  • Advanced Member
  • 435 posts
  • LocationAlways at computer!

Posted 15 September 2006 - 03:27 PM

Hi, ok i need just a little bit of help with a script ive been working on, but i have to re-write it totally,
I will be using this script for many things but the best example is in my database table i have two or more fields, like in my members table i have a number of fields of information for each member, but the main two would be 'id' and 'username', and i want to display my members list, But to the point how would i get my script to display each row from the table? say if i just wanted to display the usernames, how would i pull the username for each 'id'?
Any help is greatly appriciated!

Thanks
Abydosgater
www.abydosgaters.com

Current Project: Blog Application.. Undecided name.. Status: Coming along great.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 15 September 2006 - 05:42 PM

SELECT username FROM yourTable?

Maybe I've missed something.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 AbydosGater

AbydosGater
  • Members
  • PipPipPip
  • Advanced Member
  • 435 posts
  • LocationAlways at computer!

Posted 15 September 2006 - 09:33 PM

No lol maybe this should be in PHP Help but i want to get the script to display all the usernames, would that do that?
www.abydosgaters.com

Current Project: Blog Application.. Undecided name.. Status: Coming along great.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 16 September 2006 - 11:21 PM

Once you're retrieved all the records, a simple iteration should be able to loop through all the results.  If you need help with the PHP itself, then yes, I'll move this thread.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 AbydosGater

AbydosGater
  • Members
  • PipPipPip
  • Advanced Member
  • 435 posts
  • LocationAlways at computer!

Posted 17 September 2006 - 08:06 PM

Yeah please if you would be able to move the topic, as i will be needing some help.
www.abydosgaters.com

Current Project: Blog Application.. Undecided name.. Status: Coming along great.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users