Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-04-2005, 03:00 PM Dumb question?
The_Anomaly's Avatar
Extreme Talker

Posts: 216
Location: Boston, Ma
Trades: 0
I have a database and i want to fetch all the information from each row of the db besides the primary key. for example, i have a table named jobs with fields jobid, company name, summary, requirements, responsabilities, and salary. I want to make a page that will display all the company names and then when they click a name it shows all the info that was submitted for that company.

The_Anomaly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-04-2005, 05:03 PM
HitRaj47's Avatar
Extreme Talker

Posts: 177
Location: GA
Trades: 0
no such thing as a dumb question :P

the query:

SELECT `company name`, `summary`, `requirements`, `resposibilities`, `salary` FROM jobs

I take it jobid is the primary key?
HitRaj47 is offline
Reply With Quote
View Public Profile
 
Old 12-04-2005, 11:49 PM
Ickie's Avatar
Extreme Talker

Posts: 217
Location: Australia
Trades: 0
PHP Code:
$query "SELECT jobid, companyname, summary, requirements, responsabilities,salary FROM jobs ORDER BY id DESC";
$result mysql_query ($query);
while (
$row mysql_fetch_assoc ($result)) {

$jobid $row['jobid'];        
$companyname $row['companyname'];
$summary $row['summary'];

echo 
"Job ID: $jobid"
Like that? Im not sure if it works.
Ickie is offline
Reply With Quote
View Public Profile
 
Old 12-05-2005, 12:53 AM
The_Anomaly's Avatar
Extreme Talker

Posts: 216
Location: Boston, Ma
Trades: 0
I figured this out before i read the topic again. thank you for the replies though

I have another question i'm going to post if you wanna help with that one
The_Anomaly is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Dumb question?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31666 seconds with 12 queries