Forum Index - Web Design - PHP and MySQL Question
Author |
Initial Thread |
sP00N
Modding Wizard
Joined: Jul 5, 2007
Posts: 776
|
Post Subject: PHP and MySQL Question
Posted on: Sep 10, 2008
|
|
How would i make a query that only outputs certain rows on a table that have a specific value in a selected column?
steamid: dead7iest_weap0n
AMD X4 720 @ 3.5GHZ, 4GB DDR2, PowerColor 5770 1GB, 40" LCD, 200gb+ 2TB HDD's
Now A+, Net+, Linux+ and MCTS Windows 7 and Server '08 Certified :D
|
- Top - |
Profile - Private Message - Website - Reply
|
sP00N
Modding Wizard
Joined: Jul 5, 2007
Posts: 776
|
Post Subject: subject
Posted on: Sep 10, 2008
a numeric value ie an id # from another sql table that is in a column in the table that i want to show select data.
steamid: dead7iest_weap0n
AMD X4 720 @ 3.5GHZ, 4GB DDR2, PowerColor 5770 1GB, 40" LCD, 200gb+ 2TB HDD's
Now A+, Net+, Linux+ and MCTS Windows 7 and Server '08 Certified :D
|
- Top - |
Profile - Private Message - Website - Quote - Reply
|
sP00N
Modding Wizard
Joined: Jul 5, 2007
Posts: 776
|
Post Subject:
Posted on: Sep 10, 2008
I just want to show rows that have a specific variable numeric value in a certian column instead of all of the rows.
Here's a graphic example:
edit: epic! muh 666th post :D
steamid: dead7iest_weap0n
AMD X4 720 @ 3.5GHZ, 4GB DDR2, PowerColor 5770 1GB, 40" LCD, 200gb+ 2TB HDD's
Now A+, Net+, Linux+ and MCTS Windows 7 and Server '08 Certified :D
|
- Top - |
Profile - Private Message - Website - Quote - Reply
|
deathstarchris
Joined: Oct 26, 2006
Posts: 323
|
Post Subject: subject
Posted on: Sep 10, 2008
I apologize, I thought a simple inner join would work, but I'm not sure now. I will see if I can dig something up.
|
- Top - |
Profile - Private Message - Website - Quote - Reply
|
sP00N
Modding Wizard
Joined: Jul 5, 2007
Posts: 776
|
Post Subject: subject
Posted on: Sep 10, 2008
figured it out, just had to use the mysql_fetch_assoc() function :D and WHERE in my query. lol whenever I do the most simplest code, it always takes me a while to fix up, but this took me 5 minutes to figure out :D
steamid: dead7iest_weap0n
AMD X4 720 @ 3.5GHZ, 4GB DDR2, PowerColor 5770 1GB, 40" LCD, 200gb+ 2TB HDD's
Now A+, Net+, Linux+ and MCTS Windows 7 and Server '08 Certified :D
|
- Top - |
Profile - Private Message - Website - Quote - Reply
|
| |