RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-07 Thread Steve Jackson
stems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 > -Original Message- > From: Jason Wong [mailto:php-general@;gremlins.com.hk] > Sent: 7. marraskuuta 2002 11:51 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Help me learn! with an explanation of > these t

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-07 Thread Jason Wong
On Thursday 07 November 2002 16:28, Steve Jackson wrote: > Finally I have it! if this is your final code then you still don't "have it" ! > Cheers to all that helped. I was querying twice when I didn't need to > and as Jason said not doing anything with the extracted information. > extrac

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-07 Thread Steve Jackson
Message- > From: Jason Wong [mailto:php-general@;gremlins.com.hk] > Sent: 7. marraskuuta 2002 10:06 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Help me learn! with an explanation of > these two functions. > > > On Thursday 07 November 2002 15:15, Steve Jackson wrote:

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-07 Thread Jason Wong
On Thursday 07 November 2002 15:15, Steve Jackson wrote: > My second query still doesn't return anything? Even with $orderid = $row > removed as Jason suggested. What exactly do you mean by "doesn't return anything"? a) Does the second query fail? b) Do you get any errors? If no to both (a) and

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Steve Jackson
My second query still doesn't return anything? Even with $orderid = $row removed as Jason suggested. This is my current function. function get_order_numbers() { $conn = db_connect(); $query = "select orders.orderid from orders, email where orders.orderid = email.orderid and email.checked='no'"; $

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Jason Wong
On Wednesday 06 November 2002 21:46, Steve Jackson wrote: > It doesn't contain a single result. It returns 16 order numbers (which > is correct - 8 should be in the table emails with no checked and > therefore the query has worked and pulled out 8 from the orders table > also). What I want the fun

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Steve Jackson
> On Wednesday 06 November 2002 16:52, Steve Jackson wrote: > > Ok this is starting to get complex! (For me anyway) > > This is my function: > > function get_order_numbers() > > { > > $conn = db_connect(); > > $query = "select orders.orderid from orders, email where > > orders.orderid = email.orde

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Jason Wong
On Wednesday 06 November 2002 16:52, Steve Jackson wrote: > Ok this is starting to get complex! (For me anyway) > This is my function: > function get_order_numbers() > { > $conn = db_connect(); > $query = "select orders.orderid from orders, email where orders.orderid > = email.orderid and email.che

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Ernest E Vogelsinger
At 09:52 06.11.2002, Steve Jackson said: [snip] >function get_order_numbers() >{ >$conn = db_connect(); >$query = "select orders.orderid from orders, email where orders.orderid >= email.orderid and email.checked='no'"; >$result = mysql_query($query) or die("E

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Steve Jackson
Ok this is starting to get complex! (For me anyway) This is my function: function get_order_numbers() { $conn = db_connect(); $query = "select orders.orderid from orders, email where orders.orderid = email.orderid and email.checked='no'"; $result = mysql_query($query) or die("Error: cannot select

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-05 Thread Ernest E Vogelsinger
At 08:58 06.11.2002, Steve Jackson said: [snip] >Joins. Cool. Never heard of them before now but have started >experimenting with them. >What does this error mean? > >Error: cannot select orderid >select orderid from orders, email where orders.orderid = email

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-05 Thread Steve Jackson
Mobile +358 50 343 5159 > -Original Message- > From: 1LT John W. Holmes [mailto:holmes072000@;charter.net] > Sent: 5. marraskuuta 2002 16:59 > To: [EMAIL PROTECTED]; PHP General > Subject: Re: [PHP] Help me learn! with an explanation of > these two functions. > > > Y

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-05 Thread 1LT John W. Holmes
Your first function is only going to return one row of 'checked=no' records. The second function will only return one column of the result. What you want is a JOIN. You can do all of this with a single query. Without knowing the format of your tables exactly, I can't give you the syntax, though.

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-05 Thread Rick Emery
$orderid WILL NOT contain all the rows. mysql_fetch_array() returns only one row each time it is called. Upon fetching last row, it returns NULL/FALSE/0. Therefore, as you fetch each row, you will then execute your second function to pull all the data for that particular order number. Finally,