RE: [PHP] help with query

2012-06-07 Thread Jack Sasportas
Thanks Jim, worked like a charm. > -Original Message- > From: Jim Lucas [mailto:li...@cmsws.com] > Sent: Thursday, June 07, 2012 4:08 PM > To: Jack > Cc: PHP > Subject: Re: [PHP] help with query > > On 06/07/2012 09:37 AM, Jack wrote: > > $query = "sele

Re: [PHP] help with query

2012-06-07 Thread Jim Lucas
On 06/07/2012 09:37 AM, Jack wrote: $query = "select a.startdate, a.articleid, c.name, a.title, a.intro, a.datecreated from articles as a, categories as c where (a.startdate = -1 or a.startdate<= {$now}) and (a.enddate = -1 or a.enddate>= {$now}) and a.categoryid = c.categoryid order by a.startda

Re: [PHP] help with query

2012-06-07 Thread Ashley Sheridan
Jack wrote: >Hello All, > > > >I have this string defined for my query and it shows the different >types of >categories fine, but when I change a.categoryid = c.categoryid to >a.categoryid = 1 which is only one of the categories > >It shows me the same record twice. > > > >$query = "select a.st

[PHP] help with query

2012-06-07 Thread Jack
Hello All, I have this string defined for my query and it shows the different types of categories fine, but when I change a.categoryid = c.categoryid to a.categoryid = 1 which is only one of the categories It shows me the same record twice. $query = "select a.startdate, a.articleid, c.name

[PHP] Help with query MySQL and PHP

2008-07-03 Thread axis
Hi, I want to create a new column or table from queries of the values of columns I( already have. My table is : PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS products_id products_extra_fields_id products_extra_fields_value 1 1

[PHP] Help with query

2006-02-21 Thread Ing. Tom�s Liendo
Hi I need the students that didn't take an exam. The tables: exams(id_test, title, desciption, ) results(id_student, id_test, date, qualification...) I'm using a version of MySQL that doesn't support NOT IN, then I tried in this way: SELECT * FROM exams LEFT JOIN results ON exams.id_test=r

SV: [PHP] Help with query

2002-02-09 Thread Daniel Alsén
Thanks guys! - Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with query

2002-02-09 Thread val petruchek
> Hi, > > i can?t seem to get my head to wake up... > > How would i do to count how many different values that exists in a mysql > field? Ie i have a date-field and need to know how many different dates that > exists in the table. select count(distinct name) from site; in Mysql Valentin Petruche

Re: [PHP] Help with query

2002-02-09 Thread Bas Jobsen
$number=mysql_num_rows(mysql_query("SELECT DISTINCT date FROM $table")); Op zaterdag 09 februari 2002 13:41, schreef Daniel Alsén: > Hi, > > i can´t seem to get my head to wake up... > > How would i do to count how many different values that exists in a mysql > field? Ie i have a date-field and ne

[PHP] Help with query

2002-02-09 Thread Daniel Alsén
Hi, i can´t seem to get my head to wake up... How would i do to count how many different values that exists in a mysql field? Ie i have a date-field and need to know how many different dates that exists in the table. Regards # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704