SQL query problem

2007-11-14 Thread Matthew Stuart
Hi, I have built a site with Dreamweaver and I have a problem with a query. I am trying to pass a parameter from one page to another to drill down. Basically, I have one product entry that is in multiple categories on my website. So, say it's a dress, it is therefore related to category

Re: SQL query problem

2007-11-14 Thread Ravi Kumar.
Dear Mat, Your mail is not very clear. But I have a feeling that using '%' wildcard in the like operand should help you Regards, Ravi. On 11/14/07, Matthew Stuart [EMAIL PROTECTED] wrote: Hi, I have built a site with Dreamweaver and I have a problem with a query. I am trying to pass a

SQL-Query problem

2005-02-22 Thread Joppe A
Hello all, Have a little problem with to make a sql-query as I want to have it... The problem is I need to check in 3 tables and count out and get it presentated per n_id like n_id counted 01 5 02 10 03 2 My tables look as follows... In sub: id n_id In us: id email In

SQL Query problem

2004-02-20 Thread Claire Lee
Hi All, I have a query problem here. Say I have a table with employee records of three different departments. If each department manager wants to see employee info of their own department. Three different queries will be needed. Is there a way that I can write one single query and let SQL decide

Re: SQL Query problem

2004-02-20 Thread Duncan Hill
On Friday 20 February 2004 15:19, Claire Lee wrote: Hi All, I have a query problem here. Say I have a table with employee records of three different departments. If each department manager wants to see employee info of their own department. Three different queries will be needed. Is there a

sql Query problem?

2003-06-12 Thread Nishant
Hi, I have a sql query problem... user points table, which I am sorting(order by) points. Now if I want to have some 5 records above and below a certain member, how could I write the sql query for the same? say I want 5 records above and below NICKNAME_14! thanks and regards, point nickname

RE: Complex SQL query problem...

2002-09-23 Thread Richard Bolen
is not NULL) or (colors.parent_id is not NULL)) I need to do some more testing to be sure. Rich -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 08:46 To: Richard Bolen Subject: RE: Complex SQL query problem... After I sent this it hit me

RE: Complex SQL query problem...

2002-09-23 Thread Edward Peloke
great! hope it works ! -Original Message- From: Richard Bolen [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 9:17 AM To: MySQL Mailing List (E-mail) Cc: Edward Peloke Subject: RE: Complex SQL query problem... FYI - this query seemed to work. select * from nodes left join

Complex SQL query problem...

2002-09-20 Thread Richard Bolen
I'm trying to use a sql query to determine if an ID exists in any of 3 different tables in the database. I need to do this in one SQL query (ideally only using the ID once in the query). I'm using mysql 3.23.47. Here's an example of a query I came up with: select count(*) from jobs,

RE: Complex SQL query problem...

2002-09-20 Thread Edward Peloke
, September 20, 2002 2:37 PM To: MySQL Mailing List (E-mail) Subject: Complex SQL query problem... I'm trying to use a sql query to determine if an ID exists in any of 3 different tables in the database. I need to do this in one SQL query (ideally only using the ID once in the query). I'm using mysql

RE: Complex SQL query problem...

2002-09-20 Thread Richard Bolen
(E-mail) Subject: RE: Complex SQL query problem... try a left join select count(*) from jobs left join submissions on jobs.standard_id=submissions.color_id where jobs.standard_id=ID_VALUE and submissions.color_id is null Eddie -Original Message- From: Richard

A small SQL query problem

2002-04-12 Thread Torkil Johnsen
A small SQL query problem concerning articles and article_comments :) You experts will have no problem with this :) In brief: - I have no problems displaying the title, date, author, summary of the articles or anything. Its just doing an sql query that gets my 3 latest articles

RE: A small SQL query problem

2002-04-12 Thread Roger Baklund
* Torkil Johnsen [...] I have no problems displaying the title, date, author, summary of the articles or anything. Its just doing an sql query that gets my 3 latest articles AND counts how many comments each article has, and doing it in ONE query instead of two separate ones... :( [...] One

Re: A small SQL query problem

2002-04-12 Thread Torkil Johnsen
Thanks for the suggestion! I modified your query to something that works for me (I was inaccurate with the column names before, sorry... :) SELECT a.article_id,a.title,a.date,a.summary,COUNT(c.id) as comments FROM articles as a,article_comments as c WHERE a.article_id = c.article_id GROUP BY

Re: A small SQL query problem

2002-04-12 Thread John Klein
[EMAIL PROTECTED] wrote: Thanks for the suggestion! I modified your query to something that works for me (I was inaccurate with the column names before, sorry... :) SELECT a.article_id,a.title,a.date,a.summary,COUNT(c.id) as comments FROM articles as a,article_comments as c WHERE

RE: A small SQL query problem

2002-04-12 Thread Roger Baklund
* Torkil Johnsen This works PERFECTLY Except: If an article has NO comments, it is not returned! Use a LEFT JOIN: SELECT a.title,a.date,a.author,a.summary,COUNT(c.id) as comments FROM articles as a LEFT JOIN article_comments as c ON a.id = c.article_id GROUP BY

sql query problem

2001-08-16 Thread Fabian Groene
Dear group members, I have a serious problem with an SQL query that has kept me busy for over a week. Doing my compusory service at a non-profit environmental organisation I was asked to experiment with SQL queries within the ArcView GIS program. My problem is quite simple indeed and only

Re: sql query problem

2001-08-16 Thread Ian Barwick
On Thursday 16 August 2001 10:52, Fabian Groene wrote: (snip) My problem is quite simple indeed and only refers to the SQL query: There is a table with quite a lot of columns. But only two of them are really important for my query: One field is a date field and the other one is a group

Re: SQL query problem

2001-06-25 Thread Adrian D'Costa
On Fri, 22 Jun 2001, Thomas J Keller wrote: select zip, city, county from zipcodes where zip between 68400 and 68500; here is a portion of the garbled output: |68442 | STELLA | RICHARDSON |43 | STERLING | JOHNSON |444 | STRANG | FILLMORE |5 |

SQL query problem

2001-06-22 Thread Thomas J Keller
I am using two versions of MySQL, on two different platforms, and having the same problem on both. One very odd aspect of this problem is that it behaves precisely the same way on both platforms, down to which records are garbled onscreen and how they are garbled. Anyone with any ideas?

SQL query problem with mysql.

2001-03-05 Thread Larry Kim
hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table, and a vote table: create table candidate ( candidatenumber integer not null auto_increment,

RE: SQL query problem with mysql.

2001-03-05 Thread Aaron Weiker
PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: SQL query problem with mysql. hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table, and a vote table

Re: SQL query problem with mysql.

2001-03-05 Thread Jason Landry
Cc: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 3:54 AM Subject: SQL query problem with mysql. hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table,

Re: SQL query problem with mysql.

2001-03-05 Thread Bob Hall
hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table, and a vote table: create table candidate ( candidatenumber integer not null auto_increment,

SQL query problem

2001-01-23 Thread Sander Pilon
Okay, here's one for the guru's out there :) I have a list of entries with unique id numbers X, and a set of sort methods (S1 ... Sy). Now, if I want to get an entry at position P (0...z) in the list of entries ordered by method S1 then I'd make the following query: SELECT X FROM table WHERE

Re: SQL query problem

2001-01-23 Thread Peter Pentchev
On Tue, Jan 23, 2001 at 05:39:47PM +0100, Sander Pilon wrote: Okay, here's one for the guru's out there :) I have a list of entries with unique id numbers X, and a set of sort methods (S1 ... Sy). Now, if I want to get an entry at position P (0...z) in the list of entries ordered by