Re: query problem with null

2012-03-09 Thread Johan De Meersman
- Original Message - > From: "David Lerer" > > Have you tried to set city = null (i.e. without the quotes)? Spot on, I'd think. NULL values are not a string with "NULL" in it - that's only what it looks like in query results :-) An empty string ('') is to strings what 0 (zero) is for

Re: query problem with null

2012-03-09 Thread Richard Reina
Ahhh... Thank you, that was exactly what the problem was. I will fix the code that is setting the value of these new records to 'NULL'. Thank you. 2012/3/9 David Lerer > Have you tried to set city = null (i.e. without the quotes)? David. > > > > -Original Message- > From: Richard

RE: query problem with null

2012-03-09 Thread David Lerer
Have you tried to set city = null (i.e. without the quotes)? David. -Original Message- From: Richard Reina [mailto:gatorre...@gmail.com] Sent: Friday, March 09, 2012 4:24 PM To: mysql@lists.mysql.com Subject: query problem with null When I do the following query: SELECT * FROM

Re: Query problem

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 4:35 AM, sivasakthi <[EMAIL PROTECTED]> wrote: > Hi all, > > Iam having the one table name called AccessDetails and data inside that > tables is following, > [snip=schema] > > In that , I need to calculate the number of total sites , number of > total Accessed Sites,num

Re: Query problem

2007-05-09 Thread Martijn Tonies
> how do I return a single row per property even if it has 3 or 4 images > attached to it. Please reply to the list instead of directly to me. You could do a: select p.from properties p where exists (select i.* from images i where i.property_id = p.property_id) > > >I have a table of propert

Re: Query problem

2007-05-09 Thread ross
No I want all the properties only one regardless of how many images are attached to them. Think I need a distinct in there somewhere, - Original Message - From: "Jon Ribbens" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 09, 2007 6:56 PM Subject: Re: Query problem

Re: Query problem

2007-05-09 Thread Jon Ribbens
On Wed, May 09, 2007 at 07:14:38PM +0200, Martijn Tonies wrote: > >I have a table of properties that is linked to a table f images with a one > property to many images relationship. I >have manged this with nested > queries but want to try and do it on one line. My current query > > > >$query = "S

Re: Query problem

2007-05-09 Thread Martijn Tonies
>I have a table of properties that is linked to a table f images with a one property to many images relationship. I >have manged this with nested queries but want to try and do it on one line. My current query > >$query = "SELECT * FROM images, properties WHERE images.property_id = properties.prop

Re: Query problem

2006-08-03 Thread obed
On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote: Hi Dan, hi Obed, of course I have no specific username, I want the last 5 downloads of each distinct username in the table. :) i was thinking a lot... and i can't find the solution but maybe yo can do somthing like this select user,downl

Re: Query problem

2006-08-03 Thread Miles Thompson
At 03:08 PM 8/3/2006, André Hänsel wrote: Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per user. Can someone tell me a solution (or what to search for)? Regards, André -- MySQL General Mailing List For list archives: http://list

Re: Query problem

2006-08-03 Thread Dan Buettner
For a specific username: SELECT username, time, download FROM table WHERE username = 'someusername' ORDER BY time DESC LIMIT 5 Dan On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote: Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per

Re: Query problem

2006-08-03 Thread obed
On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote: Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per user. Can someone tell me a solution (or what to search for)? SELECT download FROM table WHERE username='user' ORDER BY time DES

Re: Query problem

2006-05-30 Thread John Meyer
Rhino wrote: - Original Message - From: "John Meyer" <[EMAIL PROTECTED]> To: "List: MySQL" Sent: Tuesday, May 30, 2006 5:09 PM Subject: Query problem Setup TITLES: TITLE_ID AUTHORS: AUTHOR_ID TITLE_AUTHOR: (TITLE_ID,AUTHOR_ID) Problem: Given a title, I need to find all the aut

Re: Query problem

2006-05-30 Thread Rhino
- Original Message - From: "John Meyer" <[EMAIL PROTECTED]> To: "List: MySQL" Sent: Tuesday, May 30, 2006 5:09 PM Subject: Query problem Setup TITLES: TITLE_ID AUTHORS: AUTHOR_ID TITLE_AUTHOR: (TITLE_ID,AUTHOR_ID) Problem: Given a title, I need to find all the authors who are

Re: Query problem: UNION in subquery

2006-05-24 Thread Luke
> To: "'Luke'" <[EMAIL PROTECTED]>; Sent: Wednesday, May 24, 2006 2:16 AM Subject: RE: Query problem: UNION in subquery Hi Luke.. Try this SELECT ObjectId FROM (SELECT f15.Form15SampleTube1RnaBarcode AS ObjectId, f15.Form15PatientID AS PtId FROM form15 f15 WHER

RE: Query problem: UNION in subquery

2006-05-23 Thread Neeraj
Hi Luke.. Try this SELECT ObjectId FROM (SELECT f15.Form15SampleTube1RnaBarcode AS ObjectId, f15.Form15PatientID AS PtId FROM form15 f15 WHERE f15.Form15SampleTube1RnaBarcode IN ('01D2V','01DH6') UNION SELECT f15.Form15SampleTube6RnaBarcode AS ObjectId, f15.Form15PatientID AS PtId

Re: query problem

2006-03-12 Thread Don Read
On Wed, 8 Mar 2006 10:12:22 - <[EMAIL PROTECTED]> wrote: > but I have two other filters which may or may not be chosen. (area, and > interest). > > $query = "SELECT * FROM $table_name WHERE sname LIKE '$search_string%' AND > area='area' AND interest='interest' ORDER BY fname $type"; > >

Re: query problem

2006-03-08 Thread Peter Brawley
[EMAIL PROTECTED] wrote: I am fairly new to sql and am now getting into the area of slightly more complex queries. At present my query is $query = "SELECT * FROM $table_name WHERE sname LIKE '$search_string%' ORDER BY fname $type"; but I have two other filters which may or may not be chosen

Re: query problem

2006-03-08 Thread Daniel da Veiga
On 3/8/06, Adrian Bruce <[EMAIL PROTECTED]> wrote: > one solution (may not be the best but would work) would be to use 'like' > instead of '=' and then put wildcards %%$var % around the variable so > that if it is not there then it wount effect the query. > Yeah, I use this kind of "trick" for SEL

Re: query problem

2006-03-08 Thread Adrian Bruce
one solution (may not be the best but would work) would be to use 'like' instead of '=' and then put wildcards %%$var % around the variable so that if it is not there then it wount effect the query. Ade [EMAIL PROTECTED] wrote: I am fairly new to sql and am now getting into the area of slight

Re: query problem

2006-02-09 Thread Conor McTernan
Sheeri, Thanks for the help. I tried your sample queries, but they dont really return what I'm looking for. I think I've found a solution though. Given the contents of a case, I'm looking for a unique case id, basicially I want to search for a case if it exists once I've decided the configuration

Re: query problem

2006-02-09 Thread sheeri kritzer
You originally mention your UNION "doesn't work" but you did not specify the query. This is a simple or query, or union. You can do either: select CaseType_idCaseType,Sizes_idsizes,qty from CaseType_has_Sizes where (qty=1 and Sizes_idsizes=2) or (qty=1 and Sizes_idsizes=4); or select CaseType_

Re: query problem

2006-02-08 Thread Conor McTernan
Sheeri, The table I'm searching on has a composite primary key since it's mapping an N:M relationship between Cases and Sizes. Here's the create statement for the table I'm searching on: DROP TABLE IF EXISTS `CaseType_has_Sizes`; CREATE TABLE `CaseType_has_Sizes` ( `CaseType_idCaseType` int(10

Re: query problem

2006-02-08 Thread sheeri kritzer
Hi Conor, The table you showed us has 2 primary keys, which is not possible. Can you do a SHOW CREATE TABLE on *each* table? -Sheeri On 2/8/06, Conor McTernan <[EMAIL PROTECTED]> wrote: > Hello, I'm having a hell of a time figuring this query out, maybe someone > can point me in the right direc

RE: Query Problem

2005-04-22 Thread Dto. Sistemas de Unitel
Ok, Thanks for all Roger. -Mensaje original- De: Roger Baklund [mailto:[EMAIL PROTECTED] Enviado el: viernes, 22 de abril de 2005 4:06 Para: Dto. Sistemas de Unitel CC: mysql@lists.mysql.com Asunto: Re: Query Problem Dto. Sistemas de Unitel wrote: > You don't understand me, I re

Re: Query Problem

2005-04-21 Thread Roger Baklund
Dto. Sistemas de Unitel wrote: You don't understand me, I refer that if in a table I use productos.prod_id and in other table indexes.id if I can use this two fields like the same index, because when I named the two equal, the index start to work fine. There should be no problem with joining two ta

RE: Query Problem

2005-04-21 Thread Dto. Sistemas de Unitel
EMAIL PROTECTED] Enviado el: jueves, 21 de abril de 2005 18:17 Para: mysql@lists.mysql.com CC: Dto. Sistemas de Unitel Asunto: Re: Query Problem Dto. Sistemas de Unitel wrote: > Hi Roger, > > You are ok, there was an index problem in one table, they name of the rows > wasn't equal and

Re: Query Problem

2005-04-21 Thread Roger Baklund
Dto. Sistemas de Unitel wrote: Hi Roger, You are ok, there was an index problem in one table, they name of the rows wasn't equal and MySQL didn't recognize they as the same index. I have changed the row name and now is working fine, but I have a little question, How can I use indexes with different

RE: Query Problem

2005-04-21 Thread Dto. Sistemas de Unitel
's tables? Thanks for your help, you have been very helpful for me. Roberto -Mensaje original- De: Roger Baklund [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 20 de abril de 2005 18:30 Para: mysql@lists.mysql.com CC: Dto. Sistemas de Unitel Asunto: Re: Query Problem Dto. Sistemas

Re: Query Problem

2005-04-20 Thread Roger Baklund
Dto. Sistemas de Unitel wrote: Hi Roger, That was just I need. The order isn’t like you say: ++-+---++---+-+- ++---+-+ | id | select_type | table | type | possible_k

Re: Query Problem

2005-04-20 Thread Dto. Sistemas de Unitel
Hi Roger, That was just I need. The order isn’t like you say: ++-+---++---+-+- ++---+-+ | id | select_type | table | type | possible_keys | key | key_len | ref

Re: Query problem

2005-04-20 Thread Roger Baklund
Dto. Sistemas de Unitel wrote: [...] something like /indexes.id=productos.prod_id and indexes.id_termino=terminos.id_termino and termino="computer" and termino=”intel”/ I know that is impossible, but maybe there is another way to make that). Yes, there is another way. You _can_ join the same tab

Re: Query Problem

2005-03-16 Thread Michael Stassen
o be printed again... Any ideas? From: sol beach <[EMAIL PROTECTED]> Reply-To: sol beach <[EMAIL PROTECTED]> To: Xristos Karvouneas <[EMAIL PROTECTED]> Subject: Re: Query Problem Date: Tue, 15 Mar 2005 12:33:24 -0800 http://www.catb.org/~esr/faqs/smart-questions.html It would

Re: Query Problem

2005-03-16 Thread SGreen
get it in the format specified in the message, i.e. if > the title is the same, I do not want it to be printed again... > > Any ideas? > > >From: gerald_clark <[EMAIL PROTECTED]> > >To: Xristos Karvouneas <[EMAIL PROTECTED]> > >CC: mysql@lists.mysql.

Re: Query Problem

2005-03-16 Thread Xristos Karvouneas
message, i.e. if the title is the same, I do not want it to be printed again... Any ideas? From: gerald_clark <[EMAIL PROTECTED]> To: Xristos Karvouneas <[EMAIL PROTECTED]> CC: mysql@lists.mysql.com Subject: Re: Query Problem Date: Tue, 15 Mar 2005 14:49:45 -0600 Xristos Karvouneas

Re: Query Problem

2005-03-16 Thread Xristos Karvouneas
message, i.e. if the title is the same, I do not want it to be printed again... Any ideas? From: sol beach <[EMAIL PROTECTED]> Reply-To: sol beach <[EMAIL PROTECTED]> To: Xristos Karvouneas <[EMAIL PROTECTED]> Subject: Re: Query Problem Date: Tue, 15 Mar 2005 12:33:24 -0800 h

Re: Query Problem

2005-03-15 Thread gerald_clark
Xristos Karvouneas wrote: Dear All, I am faced with the following problem: I have got three tables - book,author and authorbook - containing information about books and authors (some books have multiple authors). I want to do a query that would print information like: Title 1 Author 1

RE: Query problem

2005-02-18 Thread Gordon
Did you want WHERE Name LIKE 'sandy' OR (main_data.Display_In_Search = 1 AND main_data.Expiry_Date >= CurDate()) OR WHERE main_data.Expiry_Date >= CurDate() AND (Name LIKE 'sandy' OR main_data.Display_In_Search = 1 ) -Original Message

Re: Query problem

2005-02-09 Thread DanielWalker
On Tuesday 08 February 2005 17:03, Coz Web wrote: > > This will (as I believe Daniel suggested) keep things relatively > simple, avoiding an overly complex query that you cannot maintain in > the future. Well, my solution was, as you'll have observed, vastly over-complicated. I think I'd misunder

Re: query problem in num_row

2005-02-08 Thread Ligaya Turmelle
Your not getting a valid result from your query. Add if (!$result) { echo 'Bad query - message: ' . mysql_error();} I think it will give you a syntax error on your query. MySQL syntax for the LIMIT clause is: [quote] The LIMIT clause can be used to constrain the number of rows returned by the SEL

Re: Query problem

2005-02-08 Thread Coz Web
On Tue, 08 Feb 2005 15:52:02 +0100, Joachim Klöfers <[EMAIL PROTECTED]> wrote: > Oh, oh, Joachim, > not able to calculate, but asking questions about queries. > > Coz , of course its supposed to be 1955 (id 13 & 47) > > Joachim > > > Coz Web schrieb: > Just to confirm, is amount2 for region 1

Re: Query problem

2005-02-08 Thread Coz Web
On Tue, 8 Feb 2005 11:37:20 +, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Tuesday 08 February 2005 08:09, Joachim Klöfers wrote: > > Hi, all > > > > I hope somebody can help me. > > > > > > Many thanks in advance > > Joachim > > That is a very thorny problem. May I observe that you wi

Re: Query problem

2005-02-08 Thread Coz Web
Just to confirm, is amount2 for region 1 supposed to be 1630 (id 47) or 1955 (ids 13 & 47)? Coz > What I would like to have is a result like this: > ++---+--+ > | region | sum(amount1) if current=J | sum(amount2) | > ++---

Re: Query problem

2005-02-08 Thread daniel
On Tuesday 08 February 2005 08:09, Joachim Klöfers wrote: > Hi, all > > I hope somebody can help me. > > Many thanks in advance > Joachim That is a very thorny problem. May I observe that you will find things much easier, if you add unique primary keys to tables 2 & 3, thus: ALTER TABLE ADD p

Re: Query problem

2004-08-06 Thread gerald_clark
Schalk Neethling wrote: I run the following type of query against it: SELECT * FROM documents WHERE MATCH (content) AGAINST ('demyer Padgham robinson') AND doctype = 'Motion' AND jstate = 'California: State Court' OR jdistrict = 'Circuit Court: Federal, California' SELECT * FROM documents WHERE

RE: Query problem

2004-08-06 Thread Schalk Neethling
Hey there I have the following table structure: CREATE TABLE documents ( id int(11) NOT NULL auto_increment, user varchar(50) NOT NULL default '', olduser varchar(50) NOT NULL default '', username varchar(100) NOT NULL default '', uploaddate timestamp(14) NOT NULL, docdate varchar(100) NOT NU

Re: query problem

2004-06-30 Thread SGreen
06/30/2004 02:22 cc: [EMAIL PROTECTED] PM Fax to: Subject: Re: query p

Re: query problem

2004-06-30 Thread auslander
Actually, i figured it out. don't know why it was so hard to see it. all i did was change: LEFT JOIN outbound_fax_info b on ucase(a.barcode) = ucase(b.barcode) to: LEFT JOIN outbound_fax_info b on (b.barcode != '' and ucase(a.barcode = b.barcode). if barcode was blank in outbound (b) then the

Re: query problem

2004-06-30 Thread SGreen
Eliminate the rows from outbound_fax_info where the barcode is blank. The result of the JOIN will be all of the rows of inbound_fax_info matched up to: a) information form outbound_fax_info except where the barcodes match b) blank columns where the barcodes didn't match. Use the COALE

Re: Query problem

2004-06-27 Thread Eric Bergen
Post the table structure, what that query it returning and what you think it should return. -Eric On Sun, 27 Jun 2004 23:33:55 +0200, Schalk <[EMAIL PROTECTED]> wrote: > > Why is the following query retuning doctype's different to what is asked > for? > SELECT * FROM documents WHERE jstate = 'Ca

RE: Query problem

2004-06-27 Thread Schalk
Why is the following query retuning doctype’s different to what is asked for? SELECT * FROM documents WHERE jstate = 'California: State Court' AND doctype = 'Verdict'   Any ideas? As far as I can see it should only return a document if it is a Verdict and matches the state California: State Court.

Re: Query Problem with Lists

2004-06-24 Thread Eric Scuccimarra
I understand why we would want these to be in relational forms but in this situation it isn't practical for a number of reasons. Normally that would be what I would do. However in this case the nature of the application is such that doing this would cause an enormous load on the system as we wo

Re: Query Problem with Lists

2004-06-24 Thread SGreen
I understand how these lists come into existence (trust me I have had to deal with enough of them). However, it is standard practice when working with _relational_ databases to split those lists of numbers into unique record pairs in a separate table. Your original source data was not relational,

Re: Query Problem with Lists

2004-06-24 Thread Eamon Daly
I believe you could do: SELECT * FROM Table WHERE FIND_IN_SET(number, comma_delimited_field) but this will be /very/ slow. This query is forced to examine each and every row to determine whether or not your number is in the field. The better solution is to break up that field, which is generally

Re: Query Problem with Lists

2004-06-24 Thread Brent Baisley
You probably shouldn't have setup your database structure like that. You should always break out multiple values into a separate table, each value being stored in one record, then "link" them through a common record id. A one to many relation. As far as the database is concerned, those aren't de

RE: Query problem

2004-02-01 Thread Andrew Braithwaite
Hi, You need: select job,avg(sal) from emp group by 1 order by 2 limit 1; Cheers, Andrew -Original Message- From: Edouard Lauer [mailto:[EMAIL PROTECTED] Sent: Saturday 31 January 2004 19:23 To: [EMAIL PROTECTED] Subject: Query problem Hello, I would like to query the littlest aver

Re: Query problem

2004-01-31 Thread Roger Baklund
* Edouard Lauer > I would like to query the littlest average salary. I have a table with > employees and their salary like that: > > +---+--+ > | job | sal | > +---+--+ > | CLERK | 800 | > | SALESMAN | 1600 | > | SALESMAN | 1250 | > | MANAGER | 2975 | > | S

Re: Query Problem, Confused by Left Join.

2003-08-07 Thread Cybot
John Wards wrote: I have this query: SELECT * FROM news_category LEFT JOIN news_x_cat ON news_category.id = news_x_cat.cat_id WHERE ( news_x_cat.news_id = 9 OR news_x_cat.news_id IS NULL ) Which gives me this output: id title perm show news_id cat_id 1 About Us 1

Re: Query Problem, Confused by Left Join.

2003-08-06 Thread gerald_clark
You have not shown us anything that would indicate that your output is not correct. If you think something is missing you have to show us what is missing, and why you think it should not be. John Wards wrote: I have this query: SELECT * FROM news_category LEFT JOIN news_x_cat ON news_category.

Re: Query problem

2003-06-03 Thread Nils Valentin
sage - > From: "Nils Valentin" <[EMAIL PROTECTED]> > To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "My Sql List" > <[EMAIL PROTECTED]> > Sent: Sunday, June 01, 2003 19:52 > Subject: Re: Query problem > > > Hi everybody, > &

Re: Query problem

2003-06-02 Thread Sparky Kopetzky
<[EMAIL PROTECTED]> Sent: Sunday, June 01, 2003 19:52 Subject: Re: Query problem > Hi everybody, > > > I hope ASAFP stands for something like AS Soon AS Feasable Possible ;-) > > We are not going to swear are we ? > > Best regards > > Nils Valentin > > 200

Re: Query problem

2003-06-02 Thread Nils Valentin
Hi everybody, I hope ASAFP stands for something like AS Soon AS Feasable Possible ;-) We are not going to swear are we ? Best regards Nils Valentin 2003年 6月 2日 月曜日 07:30、Sparky Kopetzky さんは書きました: > I have a view I need to create from several tables where I'm looking up one > value from a tabl

Re: Query problem

2003-06-02 Thread Gürhan Özen
Hi, Sounds like you will need to use subqueries which is available at MySQL 4.1 and above .. See: http://www.mysql.com/doc/en/Nutshell_4.1_features.html Hope this helps. Gurhan On Sun, 2003-06-01 at 18:30, Sparky Kopetzky wrote: > I have a view I need to create from several tables where I'm lookin

Re: query problem

2003-01-20 Thread Stefan Hinz, iConnect \(Berlin\)
Jon, > Where can I look to see the Warnings? MySQL 4.1 will come with an enhanced error/warnings reporting system where you can use SHOW ERRORS and SHOW WARNINGS (see http://www.mysql.com/doc/en/SHOW_WARNINGS.html for details). If you don't have 4.1 (as most of us) you can tell the server to log

RE: query problem

2003-01-20 Thread Adriaan . Putter
> -Original Message- > From: Jon Miller [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 20, 2003 1:49 PM > To: [EMAIL PROTECTED] > Subject: query problem > > > I ran a query as follows: > Insert Into db_test.tbl_dbaddr (Client, Contact, Addr, > OfcPhone) SELECT Client AS Client, Bus

RE: query problem

2002-09-05 Thread Jamie Beu
nd him." G. K. Chesterton - Illustrated London News, 1/14/11 -Original Message- From: Tom Emerson [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 11:43 AM To: [EMAIL PROTECTED] Subject: RE: query problem I am by no means an "SQL-expert", but I'll give this a sh

RE: query problem

2002-09-05 Thread Tom Emerson
I am by no means an "SQL-expert", but I'll give this a shot... :) > -Original Message- > From: Richard Brenner [mailto:[EMAIL PROTECTED]] > Subject: query problem > > I have two tables with the following structure: > > Users: > | Field| Type > | id | int(10) unsigned > |

Re: Query problem in Perl

2002-09-02 Thread Ralf Narozny
Hello! Almar van Pel wrote: >Hello, > >I was trying to create a simple perl program, where my domains where listed >followed by there DNS records. >But It loops once, and then ends with error DBD::mysql::st fetch failed: >fetch() without execute() at test.cgi line 61. > >I thougt this was the ea

Re: Query problem in Perl

2002-09-02 Thread Martin Waite
On Mon, 2002-09-02 at 11:37, Harald Fuchs wrote: > In article <1030961610.8175.5.camel@pascal>, > Martin Waite <[EMAIL PROTECTED]> writes: > > > Hi, > > You need to use two separate database and statement handles - you can > > only have one active query per handle. > > > eg. > > > $dbh1 = DBI-

Re: Query problem in Perl

2002-09-02 Thread Martin Waite
Hi, You need to use two separate database and statement handles - you can only have one active query per handle. eg. $dbh1 = DBI->connect(...); $dbh2 = DBI->connect(...); $sth1 = $dbh1->prepare( ... ); $sth1->execute(...); while ( $sth1->fetch() ) { $sth2 = $dbh2->prepare( ... );

Re: Query problem

2002-08-19 Thread Francisco
Change your query for: select red,green,blue from colorchanger INNER JOIN jobattributekit ON colorcode = value where attributekit = "Color" and jobnumber = "28200124RB4-001" and scenario="JN75K"; Also remember that MySQL does not allow sub-queries. --- Amit Lonkar <[EMAIL PROTECTED]> wrote: >

Re: Query problem/mysql

2002-08-11 Thread Dan Nelson
In the last episode (Aug 12), duo fu said: > I have just created a small web site with php/mysql. I do a query > into one of my tables whose ".MYI=338K " and ".MYD=7.6M". I could > only retrieve some part of the data and then the browser just died > there. My query is " select * from Forces". The

Re: query problem

2002-07-31 Thread Roger Baklund
* saraswathy saras > i have a problem with query.I have no idea about it,whether it > can be done > or not.i want to query out name order by alphabet,The range is > provided like > Aa - Ad. > so the result should be like this:- > > Browse Aa to Ac > > Name > > A ...hm... 'A' is not in the ra

Re: Query problem

2002-07-27 Thread Diana Soares
Forget everything i said, now i realize that i didn't understand the problem very well. Francisco Reinaldo is right, use LEFT JOIN. Sorry for having replied that! On Thu, 2002-07-25 at 20:40, Kevin wrote: > Hello, > > I have a query that runs perfectly until one of the items has no value or is >

Re: Query problem

2002-07-27 Thread Diana Soares
Hi, On Thu, 2002-07-25 at 20:40, Kevin wrote: > Hello, > > I have a query that runs perfectly until one of the items has no value or is > set to 0: > > SELECT > item.*, color.Name AS COLOR, > shapecode.Shape AS SHAPE, > clarity.Name AS CLARITY > FROM item, color, shapecode, clarity

Re: Query problem

2002-07-27 Thread Francisco Reinaldo
Hi, Use LEFT JOIN instead of =. In a 1:m relationship, only records that match in both tables are selected. With L.J., the master is always selected even if the record is not present in the child. Master Id 1 2 3 4 5 Children FK_id Value 1 V1 1 V2 2 V3 Select id, value from Master,

Re: Query problem..

2002-07-26 Thread Diana Soares
Hi, If you want the last date, isn't it just: SELECT clientid,max(datedone) FROM table_name WHERE done = 'true' and x = '' GROUP BY clientid; ? Hope it helps, On Fri, 2002-07-26 at 08:27, Nixarlidis Aris wrote: > Hi, > I face the following situation.I have a number of clients-each with a

RE: Query problem

2002-07-05 Thread Dillon, John
+--+ > > I hope this helps you to better understand my problem. > If I could touch the database I would split BASIC_DATA into two different > tables AUTHORS and PUBLISHERS. But I cannot touch the DB structure. > > Gigi > > -Messaggio originale

Re: Query problem

2002-07-05 Thread Jed Verity
Hello, Gigi, By "decoded", do you mean that you want the words "Author" and "Publisher" to appear in your table instead of "1" and "2"? And you can't create or modify tables? Short of replacing the codes in the columns, it seems to me that you'd need to have a decode table. Something like: +

Re: Query problem

2002-06-11 Thread Claudio Carbone
Now it has transformed into this: "); } else{ print( "Non riesco a connettermi al server."); exit; } $user=$_POST['user']; $password=$_POST['password']; $query=(mysql_query("select * from admin where User='%$user%'",$link)); $row = mysql_fetch_array($query); if($row["user"]==$user

Re: query problem with GROUP BY and ORDER BY

2002-06-02 Thread Philip Spradling
On Sat, 01 Jun 2002 11:58:38 +0200 Claire Forchheimer <[EMAIL PROTECTED]> wrote: I know the answer to the first part at least. I think you want to use two columns in the order by clause, and leave out the group by clause. As in: select * from tbl order by apt, name; I'm afraid its too late a

Re: Query Problem

2002-05-31 Thread Denis Mcmahon
[EMAIL PROTECTED] ("Daren Cotter") wrote: >I am having major troubles creating this query...ok here's some >background info: > >I have three tables: members, which contains info about the member, such >as city, state, zip, marital status, etc; interests, which stores just >an interest_id and name

RE: Query Problem

2002-05-23 Thread Jason Soza
mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 10:31 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Query Problem Okay, I think I'm -almost- there: I have these tables: tracks albums artists Each with an id MEDIUMINT NOT NULL PRIMARY KEY and a track, album, or artist column. T

RE: Query Problem

2002-05-23 Thread Jason Soza
TED]] Sent: Thursday, May 23, 2002 9:34 PM To: Jason Soza; [EMAIL PROTECTED] Subject: RE: Query Problem Other than it is uglier than a Hut? The higest ideals of a database is to separate data into tables that keep track of data for the same objects. Some databases break these rules (oh and h

RE: Query Problem

2002-05-23 Thread Opus
nherent flaws with this design that you guys can point > out for me? Or is this actually a little more efficient than the > current way? > > Jason Soza > > - Original Message - > From: "Opus" <[EMAIL PROTECTED]> > Date: Thursday, May 23, 2002 4:50 pm &g

RE: Query Problem

2002-05-23 Thread Jason Soza
Or is this actually a little more efficient than the current way? Jason Soza - Original Message - From: "Opus" <[EMAIL PROTECTED]> Date: Thursday, May 23, 2002 4:50 pm Subject: RE: Query Problem > Jason, > > First, as to the structure of the database. I agree

RE: Query Problem

2002-05-23 Thread Opus
albums.id = albums_artists.album_id > AND artists.id = albums_artists.artist_id > > I get 718 returns instead of 614. If more than one artist is linked to one > album, only the song from the first artist shows in the tracks column and it > shows for all artists (no other songs by t

Re: Query Problem

2002-05-23 Thread Jason Soza
I'm wondering if anyone has a response for the query question I posted last night regarding my Songs/Albums/Artists database and related linking tables. I'm new to this list, so I'm not sure what kind of response time to expect. I'm still unable to solve this problem on my own, and searches o

RE: Query Problem

2002-05-22 Thread Jason Soza
lto:[EMAIL PROTECTED]]On Behalf Of Sammy Lau Sent: Wednesday, May 22, 2002 8:18 PM To: Jason Soza Cc: [EMAIL PROTECTED] Subject: Re: Query Problem to make it easier for others to help you. you should have posted the create table statement, insert statement for a small set of data so that anyone of

Re: Query Problem

2002-05-22 Thread Sammy Lau
to make it easier for others to help you. you should have posted the create table statement, insert statement for a small set of data so that anyone of us could easier reproduce your problem. btw, are you sure you need 3 links between those 3 tables. please correct me if i'm wrong. i think 2 link

Re: query problem

2002-05-02 Thread Anvar Hussain K.M.
Hi, This might work for you: select @tempvar := max(datecolumn) from tablename group by datecolumn order by datecolumn desc limit 3; select * from tablename where datecol >= @tempvar order by datecolumn desc; Anvar. At 06:12 AM 02/05/2002 +, you wrote: >hi everyboby, > >How to select lates

Re: query problem

2002-05-02 Thread Jan Peuker
Uhm, 3? Didn't you wrote 5? If you want just 3 do this: SELECT name,date FROM dates ORDER BY date LIMIT 0,3 regars, Jan - Original Message - From: "saraswathy saras" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 8:12 AM Subject: query problem > hi everyboby

RE: query problem

2002-05-02 Thread Roger Baklund
* saraswathy saras > How to select latest 3 days records from the table according to the > latests date. > The data is like this:- > > name date > a 02-03-01 > b 02-03-15 > c 02-03-20 > d 02-03-20 > e 02-04-28 > f 02-04-28 > g 02-04-30 > > The result should be lik

Re: query problem

2002-05-02 Thread Anvar Hussain K.M.
Hi, This might work for you: select @tempvar := max(datecolumn) from tablename group by datecolumn order by datecolumn desc limit 3; select * from tablename where datecol >= @tempvar order by datecolumn desc; Anvar. At 06:12 AM 02/05/2002 +, you wrote: >hi everyboby, > >How to select lates

Re: Query Problem...

2002-02-27 Thread asherh
Thanks guys, works a treat. Yip, it was the Alias thing... interesting. - Original Message - From: "Roger Baklund" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "asherh" <[EMAIL PROTECTED]> Sent: Wednesday, February 27, 2002 2:39 PM Subject: RE

RE: Query Problem...

2002-02-27 Thread Roger Baklund
* asherh > An example of the record output I was after is... > > ProjectIDProjectOwnerProjectManager > A12345 Bob Smith John Smith > > from tables: > > User - > UserIdFullName > 1Bob Smith > 2John Smith > > Project - > ProjectIdProj

Re: Query Problem...

2002-02-27 Thread DL Neil
Hi Ash, > I have tried all sorts of joins and statements without much success... I can > obtain one name or both names if they are the same... but not different > names together in the one record. =how about some example code showing what you are doing? At the very least it gives me a 'starting

Re: Query Problem...

2002-02-27 Thread asherh
joins you are talking about. I think I must be missing something fundamental here. Chrs, Ash - Original Message - From: "DL Neil" <[EMAIL PROTECTED]> To: "asherh" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, February 27, 2002 9:12 AM Su

Re: Query Problem...

2002-02-27 Thread DL Neil
Hi Ash, > I am using MySQL 3.22.32 and are trying to accomplish the following (without > going into too much detail, this is an example of the exact situation)... > > 1) I have two tables: > > a) User table containing: UserID, FullName > b) Project table containing: ProjectID, ProjectManagerID

Re: Query Problem

2002-02-20 Thread Rodney Broom
From: <[EMAIL PROTECTED]> > >>My query > select * from table1,table2 WHERE table1.ID = table2.code > >> Query results > 1 2 2 > > >> Desired results > 1 2 Try: SELECT * FROM table1,table2 WHERE table1.ID = table2.code GROUP BY table2.code You'll find this someplace in: http://ww

  1   2   >