Re: [PHP] MySQL Query Help

2010-11-21 Thread PW
SELECT * FROM products p LEFT JOIN criteria_values cv ON p.key=cv.key LEFT JOIN criteria c ON cv.key=c.key WHERE c.value IS NOT NULL Hard to answer without more detail, but I am guessing the answer will be something like the above. Your question makes it hard to understand whether c or cv is

RE: [PHP] MySQL Query Help

2010-11-21 Thread Ben Miller
SELECT * FROM products p LEFT JOIN criteria_values cv ON p.key=cv.key LEFT JOIN criteria c ON cv.key=c.key WHERE c.value IS NOT NULL Hard to answer without more detail, but I am guessing the answer will be something like the above. Your question makes it hard to understand whether c or cv is

[PHP] MySQL Query Help

2010-11-20 Thread Ben Miller
Hi, I'm building a website for a client in which I need to compare their products, side-by-side, but only include criteria for which all selected products have a value for that criteria. In my database (MySQL), I have a tables named products,criteria and criteria_values If I have something like

Re: [PHP] MySQL Query Help

2010-11-20 Thread Richard West
I'm going to jump in and throw in my 2 cents... Have you used dreamweaver? I would suggest Dreamweaver to any new programmer beginning php/mysql. It helped me out tremendously in the beginning. I'm not an advanced programmer with hand coding classes yet, but I can get any job completed for

RE: [PHP] MySQL Query Help

2010-11-20 Thread admin
-Original Message- From: Ben Miller [mailto:biprel...@gmail.com] Sent: Saturday, November 20, 2010 3:54 PM To: 'php-general' Subject: [PHP] MySQL Query Help Hi, I'm building a website for a client in which I need to compare their products, side-by-side, but only include criteria

Re: [PHP] MySQL Query Help

2010-11-20 Thread Simcha Younger
On Sat, 20 Nov 2010 13:54:29 -0700 Ben Miller biprel...@gmail.com wrote: Hi, I'm building a website for a client in which I need to compare their products, side-by-side, but only include criteria for which all selected products have a value for that criteria. In my database (MySQL), I

[PHP] MySql Query Help: COUNT()

2003-09-13 Thread [-^-!-%-
Hello everyone! I'm trying to get the total number of a certain records from a database, but the result is always '1'. Please advise! =MySql Table = =activitiy = id | employee_id | project_id | date 1 | 45 | 60 | 2003-09-09 2 | 34 | 10 | 2003-09-10 3

Re: [PHP] MySql Query Help: COUNT()

2003-09-13 Thread John W. Holmes
I'm trying to get the total number of a certain records from a database, but the result is always '1'. Please advise! =MySql Table = =activitiy = id | employee_id | project_id | date 1 | 45 | 60 | 2003-09-09 2 | 34 | 10 | 2003-09-10 3 | 45 | 45

Re: [PHP] MySQL Query Help!!!!

2002-06-14 Thread Mark Gallagher
Chris Kay wrote: The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution that go silent. I find

[PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date(YmdGi); $dbq = select(select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_long, source.source_short from detail, type, status, staff, source

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Lazor, Ed
This is a MySQL question and best directed to the MySQL mailing lists available at: http://www.mysql.com/documentation/lists.html -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:33 PM To: PHP General List Subject: [PHP] MySQL Query

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Lazor, Ed
; $dbq = select($sql); -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:33 PM To: PHP General List Subject: [PHP] MySQL Query Help I have a rather longer query which I would like to get all records past todays date. Here

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 7:33 PM To: PHP General List Subject: [PHP] MySQL Query Help I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date(YmdGi); $dbq = select(select detail

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
, 14 June 2002 1:26 PM To: Chris Kay; 'PHP General List' Subject: RE: [PHP] MySQL Query Help Man, where do I start. There could be so many things wrong. First of all, this is a PHP list, not MySQL. Second, use MySQL_error() after you issue a query to see if an error was returned

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
On Fri, 14 Jun 2002, Chris Kay wrote: The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution

[PHP] Mysql Query Help needed

2002-05-16 Thread Chris Kay
I have a query select cust_fnn, cust_name, agroup_access.group_access_cust from cust, agroup_access where agroup_access.group_access_group='$id' cust.cust_fnn!=agroup_access.group_access_cust order by cust.cust_name The 2 tables are as follows agroup_access agroup_access_id

RE: [PHP] Mysql Query Help needed

2002-05-16 Thread Jay Blanchard
[snip] select cust_fnn, cust_name, agroup_access.group_access_cust from cust, agroup_access where agroup_access.group_access_group='$id' cust.cust_fnn!=agroup_access.group_access_cust order by cust.cust_name [/snip] try this (note syntactical differences); select cust_fnn, cust_name,

Re: [PHP] MySQL query help

2001-09-11 Thread Michael George
On Mon, Sep 10, 2001 at 03:59:36PM -0500, Sheridan Saint-Michel wrote: Well, I played with this a little more and it seems to be acting oddly when you first call this select unless you set the variable first. So if the below doesn't work try actually doing this $query=set @count=NULL;

[PHP] MySQL query help

2001-09-10 Thread Michael George
I'm trying to make a query that will number it's own output rows. e.g. when listing all the entries in a table that are related to a specific invoice, there will be a column with a monotonically increasing integer value (1-x where x is the number of matching entries). I know I can easily do

Re: [PHP] MySQL query help

2001-09-10 Thread Sheridan Saint-Michel
: set @count=Null; between the selects =P Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Michael George [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 2:20 PM Subject: [PHP] MySQL query help I'm

Re: [PHP] MySQL query help

2001-09-10 Thread Sheridan Saint-Michel
www.foxjet.com - Original Message - From: Sheridan Saint-Michel [EMAIL PROTECTED] To: Michael George [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 10, 2001 3:29 PM Subject: Re: [PHP] MySQL query help See if this does what you are shooting for: select tableName.*,if(@count=1