GetDotted Domains

Viewing Thread:
"Getting Info From a Database (PHP, MySQL) Hell :D"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 11/01/04 at 17:59
Regular
"previously phuzzy."
Posts: 3,487
Lo. Again. :D

My problem this time is : I have a table with 3 rows. I need to display all the information from these rows in various places on the page. I had one query :

SELECT * FROM portal WHERE gameID='1'

But now I need info from the other 2 rows, ie,

SELECT * FROM portal WHERE gameID='2' etc

However, obviously, the second query wipes out the variables (the column names) and puts in it's own data, as does the 3rd. I tried after each query doing :

$columnname=$columnname2;

But that didn't work.

So, how can I successfully display all the info?

Oh, and I extract the data from the rows after querying the database using only SELECT *.
Mon 12/01/04 at 18:14
Regular
"previously phuzzy."
Posts: 3,487
Alas, it works! AT LAST!

*quietly weeps happy tears*
Mon 12/01/04 at 17:48
Regular
"previously phuzzy."
Posts: 3,487
More help required, me rather silly.

*slams head with club*

Have a browse of this ::


session_start();
session_register('userentry', 'password','status');
?>


LOG IN TO SYNAE|TEST




echo "



";
?>






What it should do is :

| 1 | Open a new session
| 2 | Set up session variables
| 3 | Show a form with 2 fields, userentry and password (matching session variables)
| 4 | Pass the contents of these 2 fields on when Submit is clicked to another page.

The page processes these and does some password comparison to verify the log in and if it was a success or not.

However, the form doesn't send any information across. If I set the variables myself, like

$userentry="Phuzzy" etc

It gives the correct results. So it's the form and the variables.

Please help me with a solution!
Mon 12/01/04 at 17:34
Regular
"Chavez, just hush.."
Posts: 11,080
Aoe wrote:
> The amount of sense them few posts made to someone not knowing
> anything about php is actually funny.

I haven't got a clue and I spent about 2 hours today making a little MySQL submit/editing thingy which uses all that!
Sun 11/01/04 at 20:33
Regular
"Eff, you see, kay?"
Posts: 14,156
If you think that's difficult you should see some of the P5 I found today.

http://www.sine-wave.net/stuff/p5.jpg
Sun 11/01/04 at 20:16
Regular
"\\"
Posts: 9,631
The amount of sense them few posts made to someone not knowing anything about php is actually funny.
Sun 11/01/04 at 20:10
Regular
"previously phuzzy."
Posts: 3,487
Me being dumb, sorted.

Thanks Turbo.
Sun 11/01/04 at 19:49
Regular
"previously phuzzy."
Posts: 3,487
After numbering the 3 queries, what would you type different in the variable names to differentiate between the results from the 3 queries?
Sun 11/01/04 at 19:23
Regular
"Eff, you see, kay?"
Posts: 14,156
Just use $query = mysql_query(" [ your first select ] "); $query2 = mysql_query(" [ your second select ] "); etc...
Sun 11/01/04 at 17:59
Regular
"previously phuzzy."
Posts: 3,487
Lo. Again. :D

My problem this time is : I have a table with 3 rows. I need to display all the information from these rows in various places on the page. I had one query :

SELECT * FROM portal WHERE gameID='1'

But now I need info from the other 2 rows, ie,

SELECT * FROM portal WHERE gameID='2' etc

However, obviously, the second query wipes out the variables (the column names) and puts in it's own data, as does the 3rd. I tried after each query doing :

$columnname=$columnname2;

But that didn't work.

So, how can I successfully display all the info?

Oh, and I extract the data from the rows after querying the database using only SELECT *.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd
My website looks tremendous!
Fantastic site, easy to follow, simple guides... impressed with whole package. My website looks tremendous. You don't need to be a rocket scientist to set this up, Freeola helps you step-by-step.
Susan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.