Re: [PHP-DB] Query Question

2011-05-23 Thread maarten
I would keep the db names and/or schema names in your queries. It clarifies what you are doing with the query making it easier for someone else to debug, improve, ... Certainly for those not familiar with your db structure. I am not aware of any drawbacks that can result from this. (Ok, maybe

Re: [PHP-DB] Query Question

2011-05-23 Thread maarten
That's a very good point, but since I use postgres that's one point that doesn't affect me and as such didn't cross my mind at the time. (Postgres uses schemas where mysql uses databases, a different database on postgres usually means a different database machine. And joining tables from

RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Hutchins, Richard
. -Original Message- From: Matthew Moldvan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 1:57 PM To: 'Damir Dezeljin'; PHP-db list Subject: RE: [PHP-DB] QUERY question (group by) - please help Try mysql_num_rows() ... http://www.php.net/manual/en/function.mysql-num

RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Matthew Moldvan
/ --- -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 2:07 PM To: 'Matthew Moldvan'; 'Damir Dezeljin'; PHP-db list Subject: RE: [PHP-DB] QUERY question (group by) - please help Just a side note in case it's

RE: [PHP-DB] query question

2001-08-28 Thread Dave Watkinson
instead of SELECT all_records WHERE some_condition, and then DELETE certain_rows, couldn't you just do a DELETE FROM WHERE? -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] query question Hi, If I

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
sorry I wasn't very clear, I do not actually want to delete anything from the database, I need to remove some of the query elements before it is used elsewhere (before fetch array ect), but I cannot alter the way the select query works. Dave Watkinson [EMAIL PROTECTED] wrote in message [EMAIL

RE: [PHP-DB] query question

2001-08-28 Thread Rick Emery
What exactly are you trying to do? Do you want to delete certain rows from $result? Or delete ALL rows, in which you'd use: mysql_return_result($result); If you want to delete certain rows, you can't. You just have to make your selection criteria more precise. Then, fetch row by row to weed

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
I want to loop round $result fetching rows and if the current row is not needed then removing it from $result, $result will then get used again but with the said rows removed. I am trying to do this to avoid some major code changes with what I am working with. Rick Emery [EMAIL PROTECTED]

RE: [PHP-DB] query question

2001-08-28 Thread Jon Farmer
] -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:41 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] query question I want to loop round $result fetching rows and if the current row is not needed then removing it from $result, $result will then get used again

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
01 14:41 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] query question I want to loop round $result fetching rows and if the current row is not needed then removing it from $result, $result will then get used again but with the said rows removed. I am trying to do this to avoid some major code changes w

RE: [PHP-DB] query question

2001-08-28 Thread Jon Farmer
PROTECTED] -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:54 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] query question yeh this would work, how can I assign the rows to a new array? Is each row accessed as an element? Jon Farmer [EMAIL PROTECTED