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

2007-02-12 Thread Matthew Ferry
"$event[cal_description]"; echo "\n"; echo "\n"; } while ($event = mysql_fetch_array($events)); } else { echo "No Public Events Are Currently Scheduled..."; } ?> ----- Original Message - From: "Matthew Ferry" <[EMAIL PROTECTED]> To:

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 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 / st

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

[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 quer

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 " $query "; ...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 f

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

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: [PH

RE: [PHP-DB] SQL query

2006-09-28 Thread Edwin Cruz
iembre de 2006 09:09 a.m. > Para: php-db@lists.php.net > 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-1

[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 Logisti

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

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

2004-01-15 Thread Muhammed Mamedov
ROTECTED]> To: <[EMAIL PROTECTED]> Sent: 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 ?

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

2004-01-15 Thread Nitin Mehta
itin - Original Message - From: <[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 

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 DIS

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 o

[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, editing?

2004-01-15 Thread Humberto Silva
om: 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 give me a code hint on where could, my goal is to display this

[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

[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: http://www.php.net/unsub.

RE: [PHP-DB] sql query links

2003-01-25 Thread John W. Holmes
> 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? www.youdom

[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 Ma

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

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 prob

2002-07-17 Thread Cal Evans
TED]] Sent: Wednesday, July 17, 2002 8:44 PM To: PHP DB 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 a

[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 h

Re: [PHP-DB] sql query problem

2002-06-14 Thread SenthilVelavan
query will helps you. 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 name

RE: [PHP-DB] sql query problem

2002-06-14 Thread Ryan Jameson (USA)
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 3:10 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] sql query problem I have a database layout similar to this- id order title namepagecat 0 0 title1 blueap 1 2

[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 col

Re: [PHP-DB] sql query

2002-02-18 Thread CrossWalkCentral
nd also tru echoing the value of that SQL statement (assign it to a var > first) 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

RE: [PHP-DB] sql query

2002-02-18 Thread Beau Lebens
ntral [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 simple sql query. // // Error performing service query : You have an error in your // SQL syntax near '' at l

[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

2001-11-12 Thread Gonzalez, Lorenzo
l.com/doc/A/N/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 th

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

RE: [PHP-DB] SQL query

2001-11-11 Thread Gonzalez, Lorenzo
om: Pierre 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]

[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

[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 corre