"MySQL List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 1:32 AM
Subject: Re: MySQL and PHP question
> On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote:
> >while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
> >$num1 = $line['number
On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote:
>while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
>$num1 = $line['number'];
>}
Loop through the result and return the value from the last row?
Did you want "select sum(number) as SubTotal1 from table1 where
userid=$user1
ge -
From: "Steve Yates" <[EMAIL PROTECTED]>
To: "MySQL List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 5:12 PM
Subject: Re: MySQL and PHP question
> On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote:
>
> >I can not use two mysql queries
I can...
Hard to know why without more info but a starting point would be to turn on
the query log in MySQL and see what queries it is receiving.
_
Fraser Stuart
Logistics IT
77-85Phone: +61 2 9335 1235
Roberts Rd
On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote:
>I can not use two mysql queries in the same PHP file
Please post code snippets, this is possible.
- Steve Yates
- Burger Borg: We do it our way; yours is irrelevant.
~ Taglines by Taglinator - www.srtware.com ~
--
> Why is it that I can not use two mysql queries in the same PHP file.
You can, I assure you.
> Any info is appreciated.
Perhaps if you could provide your code? W/o it there is no way we can
determine where the problem might be coming from.
Chris
Adrian D'Costa wrote:
> Hi,
>
> I have two tables city and country
> +---+-+--+-+-++
> | Field | Type| Null | Key | Default | Extra |
> +---+-+--+-+-++
> | id
This is really a JavaScript problem if you don't want to use the submit
button.
Use PHP to load the values of both tables into a JavaScript array. Then
write JS code that will change the contents of the City control based on
what is selected in the country control. Not terribly difficult.
Cal