[PHP-DB] Re: Query does not work

2014-07-01 Thread Jim Giner
Ethan - is error checking turned on as I showed you how to do EXACTLY last time you posted -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: Query does not work

2014-07-01 Thread Jim Giner
On 7/1/2014 10:26 AM, Aziz Saleh wrote: On Tue, Jul 1, 2014 at 10:02 AM, Jim Giner wrote: How about just showing us the section of code instead of disjoint pieces that WE cannot be sure are applied correctly? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP-DB] Re: Query does not work

2014-07-01 Thread Aziz Saleh
On Tue, Jul 1, 2014 at 10:02 AM, Jim Giner wrote: > How about just showing us the section of code instead of disjoint pieces > that WE cannot be sure are applied correctly? > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Also th

[PHP-DB] Re: Query does not work

2014-07-01 Thread Jim Giner
How about just showing us the section of code instead of disjoint pieces that WE cannot be sure are applied correctly? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Query will not work - SOLVED

2013-02-03 Thread David Robley
"Ethan Rosenberg, PhD" wrote: > What am I doing wrong?? Not checking the errors that mysql returns? -- Cheers David Robley Tennis in the Bible: "Moses served in Pharaoh's court..." -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Query Across DBMS Boundaries (Linked Database Servers?)

2008-03-21 Thread Neil Smith [MVP, Digital media]
At 14:12 21/03/2008, you wrote: Message-ID: <[EMAIL PROTECTED]> Date: Thu, 20 Mar 2008 11:05:22 -0500 From: "Dee Ayy" <[EMAIL PROTECTED]> To: php-db@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Query Across DBMS Boundari

[PHP-DB] Re: Query Across DBMS Boundaries (Linked Database Servers?)

2008-03-20 Thread Dee Ayy
Wow! I just found the Federated Storage Engine. http://dev.mysql.com/tech-resources/articles/mysql-federated-storage.html It's not in our SHOW ENGINES though. I still welcome comments. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Query executing

2007-10-05 Thread Thomas Tschernich
How would I know if this mySQL query: DELETE FROM `table` WHERE `date_to_be_deleted` LIKE '$todays_date' actually deleted any rows from the table? www.php.net/mysql_affected_rows Greetings, Thomas Tschernich -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

[PHP-DB] Re: Query Object in PHP?

2007-03-03 Thread js
Ansering myself. DB_DataObject http://pear.php.net/package/DB_DataObject/ On 2/25/07, js <[EMAIL PROTECTED]> wrote: Hi list, Is there any implementation of Query Object [1] written in PHP? I spent some time searching on the net but no clues're found. Thank you in advance. [1] http://www.ma

[PHP-DB] Re: query error

2005-04-17 Thread Dasmeet Singh
pete M wrote: I've got a database table with a whole list of "windows" file paths. eg Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.ln

[PHP-DB] Re: query error

2005-04-16 Thread Satyam
I believe the \ preceding the last % makes it a literal % not the wildcard % "pete M" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've got a database table with a whole list of "windows" file paths. > > eg > Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk >

[PHP-DB] Re: Query returns duplicate rows

2004-07-22 Thread David Robley
On Thu, 22 Jul 2004 05:59, Brock Jimmy D Contr 74 Mdss/Sgsi wrote: > My query is returning duplicates rows. > > table: elements > elementId > standardId > elementtext > category > mcode > linenum > > table: scores > scoreId > taskId > scores > > Here's my query: > SELECT distinct elementtext,ca

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

2004-07-14 Thread Micah Stevens
For those that are curious, here's the working query: SELECT options. * , count( option_items.optionID ) AS n FROM options LEFT JOIN option_links USING ( optionID ) LEFT JOIN option_items ON options.optionID = option_items.optionID WHERE option_links.productID = '$productID' GROUP BY options.optio

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

2004-07-14 Thread Micah Stevens
Sorry, I'm wrong.. WHERE cannot refer to aggregate columns.. you must use the HAVING clause. -Micah On Wednesday 14 July 2004 12:07, Micah Stevens wrote: > It is a column.. ;) > > And the docs say you can refer to an aliased aggregate column in the where > clause: > > http://dev.mysql.com/do

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

2004-07-14 Thread Micah Stevens
It is a column.. ;) And the docs say you can refer to an aliased aggregate column in the where clause: http://dev.mysql.com/doc/mysql/en/SELECT.html I'll take this to the mysql list.. Thanks for your help.. -Micah On Wednesday 14 July 2004 12:01, Torsten Roehr wrote: > "Micah Stevens" <[EMAI

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

2004-07-14 Thread Torsten Roehr
"Micah Stevens" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you Torsten , > > They're backticks, and I get the same error after removing them. > > Any other ideas? Then I guess you can't use num in your WHERE clause - MySQL thinks it's a column. Torsten > > > -Micah > > >

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

2004-07-14 Thread Micah Stevens
Thank you Torsten , They're backticks, and I get the same error after removing them. Any other ideas? -Micah On Wednesday 14 July 2004 11:48, Torsten Roehr wrote: > "Micah Stevens" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > Hi, > > > > I'm getting an unknown colum `

[PHP-DB] Re: query problem..

2004-07-14 Thread Torsten Roehr
"Micah Stevens" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm getting an unknown colum `num` in where clause error with this query: > > $options = mysql_query("select options.*, > count(option_items.optionID) as `num` > from options > left join option_links using (

[PHP-DB] Re: Query help

2004-07-09 Thread Peter Westergaard
Oh, and I assume you left out the part of the query where you bound tables routes and users? -P "Craig Hoffman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "SELECT * FROM routes, users WHERE area='$area' AND style='$style' > BETWEEN rating='[$rating1]' AND rating='[$rating2]' GRO

[PHP-DB] Re: Query help

2004-07-09 Thread Peter Westergaard
I think you want: "SELECT * FROM routes, users WHERE area='$area' AND style='$style' AND rating BETWEEN '[$rating1]' AND '[$rating2]' GROUP BY route ORDER BY rating ASC "; >From http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html "expr BETWEEN min AND max If expr is greater than or equal

[PHP-DB] Re: Query for Most Recent Entry

2004-07-02 Thread Chris
Is the primary key field numerical? If so then you can try to use an sql statement like: SELECT MAX(field) AS max_field FROM table GROUP BY max_field Chris "Jimi Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I'm trying to figure out how to write a MySQL query that w

[PHP-DB] Re: Query Help!

2004-04-08 Thread JeRRy
Date: 8 Apr 2004 09:12:46 - To: [EMAIL PROTECTED] From: "David Robley" <[EMAIL PROTECTED]> Subject: Re: Query Help! Have you tried SELECT `username` , `score` FROM round" . ($round_number -1) . " WHERE 1 ORDER BY `score` DESC LIMIT 0, 30 Ahh just tried it and relised what is going

[PHP-DB] Re: Query Help!

2004-04-08 Thread JeRRy
Date: 8 Apr 2004 09:12:46 - To: [EMAIL PROTECTED] From: "David Robley" <[EMAIL PROTECTED]> Subject: Re: Query Help! [EMAIL PROTECTED] (Jerry) wrote in news:[EMAIL PROTECTED]: > Hi Everyone, Happy Easter to you all. > > I have this query, reasoning for posting on this > Mailing List is

[PHP-DB] Re: Query Help!

2004-04-08 Thread David Robley
[EMAIL PROTECTED] (Jerry) wrote in news:[EMAIL PROTECTED]: > Hi Everyone, Happy Easter to you all. > > I have this query, reasoning for posting on this > Mailing List is under it. :) > > SELECT `username` , `score` FROM round" . > $round_number . " WHERE 1 > ORDER BY `score` DESC LIMIT 0, 30 >

[PHP-DB] RE: Query works but can't echo variable :'(

2003-10-27 Thread Jeremy Shovan
You are selecting it as date but trying to echo DateOfOrder Try this: $TheDate = mysql_query("select DATE_FORMAT(DateOfOrder, '%d, %m, %Y') as date from Orders Where Orders.ID = '$TransID'"); while($OrderDate = mysql_fetch_array($TheDate)) { $Date = $OrderDate["date"]; } -Original Message--

RE: [PHP-DB] RE: query is returning over 74,000 results and taking 30 seconds - HELP!

2003-08-04 Thread Aaron Wolski
ery to prevent this? For the DMC Left Join.. is should have returned: 2067 rows in set (1.63 sec) ANY idea's? Aaron -Original Message- From: Nelson Goforth [mailto:[EMAIL PROTECTED] Sent: August 4, 2003 2:16 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] RE: query is returning over 74,0

[PHP-DB] RE: query is returning over 74,000 results and taking 30 seconds - HELP!

2003-08-04 Thread Nelson Goforth
Have you tried the MySQL EXPLAIN command to look at your statement? That can provide some insight when nothing else works. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: QUERY question (group by) - please help

2003-01-10 Thread Martin Ramsch
I wrote: > For the C API see > http://www.mysql.com/doc/en/mysql_affected_rows.html > http://www.mysql.com/doc/en/mysql_num_rows.html > > The MySQL interface in every other language should have similar > functions available ... Ups, I _am_ in a PHP list/newgroup, so the more specific answer i

[PHP-DB] Re: QUERY question (group by) - please help

2003-01-10 Thread Martin Ramsch
Damir Dezeljin <[EMAIL PROTECTED]> wrote: > I want to calculate how many rows my MySQL query [...] returns. For the C API see http://www.mysql.com/doc/en/mysql_affected_rows.html http://www.mysql.com/doc/en/mysql_num_rows.html The MySQL interface in every other language should have similar f

[PHP-DB] Re: query

2002-12-04 Thread Dave
echo the actual sql statement from runtime and post it. "Natividad Castro" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi to all, > I'm working in a system where users can post projects. Other users will > verify those projects. What I'm trying to do is onc

[PHP-DB] Re: Query from Hell (for me anyway)

2002-06-02 Thread Hugh Bothwell
"Chris Mackenzie" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've been trying to solve this for hours now with no end in sight, I'm > hoping that someone here might be able to help me. > > I've got four tables set out as shown below: > > tbl_student_details

[PHP-DB] Re: query

2002-05-13 Thread Adam Royle
Not sure if you received this previously. Try this query below. Adam. $query = mysql_query("SELECT * from 150bk where Signature like '%1' and 150bk.ID ='$rec_id' limit 1");

[PHP-DB] Re: Query Optimizing on sum() function

2002-01-10 Thread Manuel Lemos
Hello, Nomor Satu Bajingan wrote: > > Hello Friends, > I've some performance problem, when I do sum() functions on my tables it > took 5-7 minutes to return the results.. here is my story: > I've table with 2461566 rows here is my table structure: > mysql> describe imp_log; > +--+---

[PHP-DB] RE: query and count

2002-01-09 Thread Peter Westergaard
It seems like what you're looking for is first to do a "SELECT DISTINCT .." to find all the unique topic names in the system. This, in your case, would present you with Billie, Bill, Bret, ... etc. Then, in a loop as you traverse this result, create a query for the count of each of these spe

[PHP-DB] Re: Query construction

2001-08-22 Thread Michael Kumar
dang, messed up the order of statements, sorry. of course it must read: select count(*) from posts where category = 'foobar' group by category regards, mike. -- mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com) PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F CFB2 55D6 AA75 .: kno

[PHP-DB] Re: Query construction

2001-08-22 Thread Michael Kumar
select count(*), category from posts group by category or select count(*) from posts group by category where category = 'foobar' should do the trick. regards, mike. -- mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com) PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F CFB2 55D6 AA75

[PHP-DB] Re: Query construction

2001-08-21 Thread Russ Michell
Steve: I tried your method which is pretty much what I was trying already, but got the following error message: MySQL Error Info 1064: You have an error in your SQL syntax near 'distinct(category)) AS total FROM posts' at line 1 I am using MySQL 3.22.32 (Quite an oldish version - not sure if

[PHP-DB] Re: Query construction

2001-08-21 Thread Steve Brett
select count(distinct(category)) as number_of_posts from posts; should do it. Steve "Russ Michell" <[EMAIL PROTECTED]> wrote in message news:SIMEON.10108211219.F@k1c. anglia.ac.uk... > Hi there people: > > I have a MySQL table consisting of category names among other things. > I would like to b

[PHP-DB] Re: query returned "Resource id #2"

2001-08-17 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Default) wrote: > I'm using PHP 4 and mysql. I'm trying to do just a simple query from a > database table, but every time it returns the value, it returns > "Resource id #2" and results like that. Any ideas? Thanks. This is correct. See the

[PHP-DB] Re: query returned "Resource id #2" (quick php/mysql tutorial)

2001-08-17 Thread Jonathan Hilgeman
Hi Alex, mySQL doesn't return normal PHP values. You need to use mysql functions to convert the mySQL resulting data into an array, like so: // mySQL Table: // // field1 | field2 | stuff | // // Florida | Ferrari | George | /

RE: [PHP-DB] Re: Query and Date problem

2001-08-15 Thread Jeff Oien
> "Jeff Oien" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I want to retrieve the last 15 days of data from a certain time but > > not today's. I have this but it's still giving me today's data: > > > > $today = date("Y-m-d"); > > $sql = "SELECT volume, d

[PHP-DB] Re: Query and Date problem

2001-08-15 Thread Hugh Bothwell
"Jeff Oien" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to retrieve the last 15 days of data from a certain time but > not today's. I have this but it's still giving me today's data: > > $today = date("Y-m-d"); > $sql = "SELECT volume, date, time, id

[PHP-DB] Re: Query displays one

2001-07-30 Thread Mike Gifford
Hi Hugh, Hugh Bothwell wrote: > "Mike Gifford" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>The problem is that I am only getting one response from this query rather >> > than > >>5. I can't figure this out. What did I do to only get one response? >

[PHP-DB] Re: Query displays one

2001-07-30 Thread Hugh Bothwell
"Mike Gifford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The problem is that I am only getting one response from this query rather than > 5. I can't figure this out. What did I do to only get one response? Try removing the ORDER BY and LIMIT and run th