Database Query Help
Posted: Fri Dec 14, 2007 9:48 pm
HI,
I got a Database with a Table. The table consists of 2 columns. One named first, the other named second. In these Databases values get inserted.
Specifically, values of users get inserted, cause my whole project consists of a type of community.
Now, I got a Cookie:
which tells me which user is logged in. I now want to select all the values in the table from the 2 columns which have the same value. Each value, in the table) has one other value and I want to be able to select exactly these values:
A little demonstration of what I mean:
Database:
first second
Patrick Philip
Danny Thomas
Alex Patrick
Timmy Patrick
Patrick Moritz
As you can see I have 4 Patrick's in my database. And now I would like to be able to select the underlined values and put them on my php page in the format value, value etc.
I couldn't think of any possible to way to do this, but I also just started with programming. So, I would really appreciate somebody helping me out here. Thanks a lot guys ..
I got a Database with a Table. The table consists of 2 columns. One named first, the other named second. In these Databases values get inserted.
Specifically, values of users get inserted, cause my whole project consists of a type of community.
Now, I got a Cookie:
Code: Select all
$username;A little demonstration of what I mean:
Database:
first second
Patrick Philip
Danny Thomas
Alex Patrick
Timmy Patrick
Patrick Moritz
As you can see I have 4 Patrick's in my database. And now I would like to be able to select the underlined values and put them on my php page in the format value, value etc.
I couldn't think of any possible to way to do this, but I also just started with programming. So, I would really appreciate somebody helping me out here. Thanks a lot guys ..