Pulling specific cell data from mySQL db

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
crazyb8ss
Forum Newbie
Posts: 11
Joined: Thu Jan 27, 2005 9:20 pm

Pulling specific cell data from mySQL db

Post by crazyb8ss »

If i have a table, UserData, which columns userID username, password, title, email, title 1, title2, ... title 10, text 1, text 2, ... text 10 and the rows use userID as a primary identifier, how would i reteive data from say userID #7, and from the title10 column?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

time to read yourself an introduction into sql?

Code: Select all

SELECT column10
FROM foo
WHERE userID=7;
crazyb8ss
Forum Newbie
Posts: 11
Joined: Thu Jan 27, 2005 9:20 pm

Post by crazyb8ss »

read? whats that? nobody reads anymore :lol:
crazyb8ss
Forum Newbie
Posts: 11
Joined: Thu Jan 27, 2005 9:20 pm

Post by crazyb8ss »

after reading a section of the book that originally taught me php i solved the problem. I wwas unaware that the sql data could be outputted to an array
Post Reply