[PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread Matthew Ferry
Hello Everyone Got a simple / stupid question. Worked on this all night. I'm over looking something very basic here. The query event_time brings back the calendar id for each event that is pending in the future. ie 12, 13, 14, 26 (There could be 100 of them out there) The second query

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread Brad Bonkoski
Matthew Ferry wrote: Hello Everyone Got a simple / stupid question. Worked on this all night. I'm over looking something very basic here. The query event_time brings back the calendar id for each event that is pending in the future. ie 12, 13, 14, 26 (There could be 100 of them out

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread tg-php
Try this as your SQL. It should give you all the results, then you can use PHP to sort it all out. SELECT * FROM egw_cal WHERE cal_category='501' and cal_id in (SELECT cal_id FROM egw_cal_dates where cal_start $tstamp) -TG = = = Original message = = = Hello Everyone Got a simple /

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread Micah Stevens
This is a join - Read up on them, they're very useful and don't require the overhead of a sub-query. SELECT egw_cal.* FROM egw_cal_dates LEFT JOIN egw_cal using (cal_id) where egw_cal_dates.cal_start $tstamp AND egw_cal.cal_category = '501' -Micah On 02/12/2007

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread Matthew Ferry
; } while ($event = mysql_fetch_array($events)); } else { echo No Public Events Are Currently Scheduled...; } ? - Original Message - From: Matthew Ferry [EMAIL PROTECTED] To: php-db@lists.php.net Sent: Monday, February 12, 2007 11:14 AM Subject: [PHP-DB] SQL Query - Using variable from

Re: [PHP-DB] SQL query error

2006-12-16 Thread Jeffrey
Chris Carter wrote: What wrong with this syntax, its not giving any error on runtime but I am facing a blank page while paging. $query= SELECT * FROM gurgaonmalls WHERE mallname = '$mallname' limit $eu, $limit ; Have you tried... echo p $query /p; ...to unsure the variables have the values

[PHP-DB] SQL query error

2006-12-15 Thread Chris Carter
What wrong with this syntax, its not giving any error on runtime but I am facing a blank page while paging. $query= SELECT * FROM gurgaonmalls WHERE mallname = '$mallname' limit $eu, $limit ; -- View this message in context: http://www.nabble.com/SQL-query-error-tf2831052.html#a7903857 Sent

[PHP-DB] SQL query

2006-09-28 Thread Miguel Guirao
Hello list, Whats wrong with my SQL query: $query=select email from usuarios where userName = (select username from fussv where folio = 'FUSS-130-2006'); I get an error! I have tested the two individual sentences and they worked OK! --- Miguel Guirao Aguilera

RE: [PHP-DB] SQL query

2006-09-28 Thread Edwin Cruz
Asunto: [PHP-DB] SQL query Hello list, Whats wrong with my SQL query: $query=select email from usuarios where userName = (select username from fussv where folio = 'FUSS-130-2006'); I get an error! I have tested the two individual sentences and they worked OK

RE: [PHP-DB] SQL query

2006-09-28 Thread Dwight Altman
Check your version. Subselects were only added in MySQL Version 4.1. Regards, Dwight -Original Message- From: Edwin Cruz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 10:53 AM To: 'Miguel Guirao'; php-db@lists.php.net Subject: RE: [PHP-DB] SQL query Make sure

RE: [PHP-DB] SQL query

2006-09-28 Thread Miguel Guirao
OK, this makes my day clear!! I have versiĆ³n 3.23.49-3 of MySQL Thanks Dwight! -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED] Sent: Jueves, 28 de Septiembre de 2006 11:32 a.m. To: php-db@lists.php.net Subject: RE: [PHP-DB] SQL query Check your version. Subselects

[PHP-DB] sql query, editing?

2004-01-15 Thread Louie Miranda
I have this code below, it fetches data on a mysql database. I was hoping you could give me a code hint on where could, my goal is to display this data on a browser which i did already and be able to edit it via a form. edit? - table1=value - table2=value I dont know where to start. please help

RE: [PHP-DB] sql query, editing?

2004-01-15 Thread Humberto Silva
Silva World Editing Portugal -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 15 de Janeiro de 2004 8:00 To: [EMAIL PROTECTED] Subject: [PHP-DB] sql query, editing? I have this code below, it fetches data on a mysql database. I was hoping you could

[PHP-DB] SQL query...

2004-01-15 Thread Tristan . Pretty
SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ??? desc In the above sql statement, I'm trying to achieve: 1. select all file names, between two dates. 2. list them, and order by the highest number

RE: [PHP-DB] SQL query...

2004-01-15 Thread brett king
SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ??? desc In the above sql statement, I'm trying to achieve: 1. select all file names, between two dates. 2. list them, and order by the highest number of

RE: [PHP-DB] SQL query...

2004-01-15 Thread Tristan . Pretty
Ah... you can name the count().. live and learn, cheers dude... brett king [EMAIL PROTECTED] 15/01/2004 11:17 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED], [EMAIL PROTECTED] cc Subject RE: [PHP-DB] SQL query... SELECT DISTINCT(file_name), Count(file_name) FROM $table_name

Re: [PHP-DB] SQL query...

2004-01-15 Thread Nitin Mehta
: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:31 PM Subject: [PHP-DB] SQL query... SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ??? desc In the above sql statement

Re: [PHP-DB] SQL query...

2004-01-15 Thread Muhammed Mamedov
: Thursday, January 15, 2004 1:01 PM Subject: [PHP-DB] SQL query... SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ??? desc In the above sql statement, I'm trying to achieve: 1. select all file names

Re: [PHP-DB] SQL query...

2004-01-15 Thread CPT John W. Holmes
From: Muhammed Mamedov [EMAIL PROTECTED] Try this SELECT DISTINCT(file_name), Count(file_name) AS cnt FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by cnt; desc If you're GROUPing by file_name then you don't need DISTINCT(file_name)... it's

[PHP-DB] sql query

2003-11-25 Thread pete M
why does this select date(date_file_created) from files create the error error near near '(date_file_created) from files' at line 1 trying to extract the date part of the date_tile filed tia pete -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] sql query links

2003-01-24 Thread david
i'm starting out in this whole thing, and i'm trying to program a zine that uses a sql database for content and calls the content into a template. what i am unclear on how to do is set up the links so that I can get the info from the database. anyone willing to help me out? -- PHP Database

[PHP-DB] SQL Query

2002-09-06 Thread Bryan McLemore
Hi Guys I have written this SQL Query : CREATE TABLE tasks (id INT AUTO_INCREMENT, name VARCHAR(50), desc TEXT, address VARCHAR(50), startDate DATE, lastWork DATE, progress INT(3)) I'm sending it in through php and I can't get it to work correctly. Please help. Also, I would like to make id

Re: [PHP-DB] SQL Query

2002-09-06 Thread Adam Williams
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY Adam On Sat, 7 Sep 2002, Bryan McLemore wrote: Hi Guys I have written this SQL Query : CREATE TABLE tasks (id INT AUTO_INCREMENT, name VARCHAR(50), desc TEXT, address VARCHAR(50), startDate DATE, lastWork DATE, progress

[PHP-DB] SQL query prob

2002-07-17 Thread Russ
I'll try that one again I have a query: $sql = SELECT * FROM contacts ORDER BY ContactType; There are two types of contacts: * Commissioners * Staff As they are ordered by the ContactType then 'Commissioners' are displayed first followed by 'Staff'. I'd like to be able to display a

RE: [PHP-DB] SQL query prob

2002-07-17 Thread Cal Evans
Mailing List (E-mail) Subject: [PHP-DB] SQL query prob I'll try that one again I have a query: $sql = SELECT * FROM contacts ORDER BY ContactType; There are two types of contacts: * Commissioners * Staff As they are ordered by the ContactType then 'Commissioners' are displayed first followed

[PHP-DB] sql query problem

2002-06-14 Thread chip . wiegand
I have a database layout similar to this- id order title namepagecat 0 0 title1 blueap 1 2 blue1 page1 ap 2 3 blue2 page2 ap 3 1 blue3 page3 ap I would like to get title1 (title

Re: [PHP-DB] sql query problem

2002-06-14 Thread SenthilVelavan
. Regards, SenthilVelavan.P - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 15, 2002 2:39 AM Subject: [PHP-DB] sql query problem I have a database layout similar to this- id order title namepagecat 0 0 title1 blue

[PHP-DB] sql query

2002-02-18 Thread CrossWalkCentral
I am having a minor problem doing a simple sql query. Error performing service query : You have an error in your SQL syntax near '' at line 1 Here is a snip of the code: Please let me know what you think. if ($submit): $status=0; // REQUEST INFO FOR SERVICES $results = mysql_query( SELECT *

RE: [PHP-DB] sql query

2002-02-18 Thread Beau Lebens
PROTECTED]] // Sent: Tuesday, 19 February 2002 9:31 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] sql query // // // I am having a minor problem doing a simple sql query. // // Error performing service query : You have an error in your // SQL syntax near '' at line 1 // // Here is a snip

Re: [PHP-DB] sql query

2002-02-18 Thread CrossWalkCentral
to make sure you are getting the right thing. HTH /b // -Original Message- // From: CrossWalkCentral [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 19 February 2002 9:31 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] sql query // // // I am having a minor problem doing a si

RE: [PHP-DB] SQL query

2001-11-12 Thread Gonzalez, Lorenzo
/ANSI_diff_Sub-selects.html -Original Message- From: Pierre Sent: Mon 11/12/2001 12:20 AM To: Gonzalez, Lorenzo; [EMAIL PROTECTED] Cc: Subject: Re: [PHP-DB] SQL query Thanks but I think subselect

[PHP-DB] SQL query

2001-11-11 Thread Pierre
I have two tables, one call category, the other chapter Category table [id][name] [1][a] [2][b] [3][c] [4][d] Chapter table [id][FK_name] [1][a] [2][a] [3][c] I would like to get the list of names of the Category table that are NOT present in the Chapter table. On this example, I should find

RE: [PHP-DB] SQL query

2001-11-11 Thread Gonzalez, Lorenzo
Sent: Sun 11/11/2001 10:01 PM To: [EMAIL PROTECTED] Cc: Subject: [PHP-DB] SQL query I have two tables, one call category, the other chapter Category table [id][name] [1][a] [2][b

Re: [PHP-DB] SQL query

2001-11-11 Thread Pierre
Thanks but I think subselect is not possible with MYSQL. Pierre - Original Message - From: Gonzalez, Lorenzo [EMAIL PROTECTED] To: Pierre [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, November 12, 2001 1:08 PM Subject: RE: [PHP-DB] SQL query in other RDBMs this is easily done

[PHP-DB] SQL query (OT)

2001-08-21 Thread Adv. Systems Design
hi: I have 2 tables, lesson and lesson_gle, where lesson holds lesson data and lesson_gle holds repeating data that are how the lesson correlates to various state standards (one lesson can have many correlations)...one particular lesson may have a math correlation as well as a language arts