RE: Group_Concat help...

2012-03-19 Thread Steven Staples
-Original Message- From: Mihail Manolov [mailto:mihail.mano...@liquidation.com] Sent: March 19, 2012 12:44 PM To: Steven Staples Cc: mysql@lists.mysql.com Subject: Re: Group_Concat help... Try this SELECT `user_id`, `login_ip`, COUNT(`id`) AS 'connections' FROM `mysql_test

Re: Group_Concat help...

2012-03-19 Thread Hal�sz S�ndor
; 2012/03/19 12:06 -0400, Steven Staples SELECT `user_id`, GROUP_CONCAT(DISTINCT `login_ip`) AS 'login_ips', COUNT(`id`) AS 'connections' FROM `mysql_test` WHERE `login_datetime` BETWEEN '2012-03-19 00:00:00' AND '2012-03-19 23:59:59' GROUP BY `user_id` HAVING COUNT(`id`) 2 ORDER BY COUNT(`id`)

Re: Query help...

2012-02-29 Thread Singer X.J. Wang
http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html#function_ifnull On Wed, Feb 29, 2012 at 13:15, Don Wieland d...@pointmade.net wrote: Little help... In my mySQL query editor, I am trying to return a value of 0 when there is no related rows from this query: (select

Re: Query help...

2012-02-29 Thread Michael Heaney
On 2/29/2012 1:15 PM, Don Wieland wrote: Little help... In my mySQL query editor, I am trying to return a value of 0 when there is no related rows from this query: (select if(count(ip.payment_amount) IS NOT NULL, count(ip.payment_amount) , 0) FROM tl_trans_pmt_items ip WHERE t.transaction_id

Re: need help with -- unknown variable

2011-06-13 Thread Andrew Moore
Check if this is in the [mysqldump] section of your my.cnf file(s). Of course it might not be a valid option in mysqldump...I haven't checked... On 13 Jun 2011 17:00, Brown, Charles cbr...@bmi.com wrote: Hello All ~ I attempted to do a mysqldump when I got this message -- see below: mysqldump:

RE: need help with -- unknown variable

2011-06-13 Thread Brown, Charles
Subject: Re: need help with -- unknown variable Check if this is in the [mysqldump] section of your my.cnf file(s). Of course it might not be a valid option in mysqldump...I haven't checked... On 13 Jun 2011 17:00, Brown, Charles cbr...@bmi.commailto:cbr...@bmi.com wrote: Hello All ~ I attempted

Re: need help creating relation

2011-05-23 Thread Jo�o C�ndido de Souza Neto
I could be wrong but I think your problem is the unique index. -- João Cândido de Souza Neto robert rottermann rob...@redcor.ch escreveu na mensagem news:4dd967a8.5040...@redcor.ch... Hi there, I would like to create a table that optionally links to an other table. The field company_id in

Re: Need help with query

2011-03-23 Thread S�ndor Hal�sz
2011/03/15 17:51 -0500, LAMP Let's say there is a table orders (simplified, of course) CREATE TABLE orders ( item_id int, org_id int, ) ENGINE=MyISAM Need to select all (distinct) org_id they have item_id 34, 36, 58 and 63. All of them, not only some of them. Result is org_id=2607 and

Re: Need help with query

2011-03-19 Thread Roy Lyseng
Hi! I think that the query that you have proposed is the best possible for the problem. However, if there are duplicates in the orders table, then HAVING COUNT(item_id) = 4 should be replaced with HAVING COUNT(DISTINCT item_id) = 4 (I assume that you meant item_id and not org_id in the

Re: Need help with query

2011-03-18 Thread LAMP
On Mar 17, 2011, at 3:01 PM, Geert-Jan Brits wrote: Indeed, I don't thing there is. Just be sure that each record has an unique combination of org_id and item_id, otherwise you might end up with an org_id that, for example, references 4 times item_id 34 in 4 different records, but no

Re: Need help with query

2011-03-18 Thread S�ndor Hal�sz
2011/03/18 08:49 -0500, LAMP Is here anybody from mysql development team, to suggest to build IN ALL function? There is a problem here: the basic operation is on the record, each record by each record, all by itself. The solution to your problem entails acting on more distinct records until

Re: Need help with query

2011-03-17 Thread LAMP
Yes, that was my question. Though, since English is not my first language, let me try to post it again: There is a list of all orgs and items org bough, from table called orders item_idorg_id 342607 342607 341520 362607 361520 368934 38

Re: Need help with query

2011-03-17 Thread Peter Brawley
What I need is a list of orgs they bought all of items 34, 36, 58, 63. every of them. Some solutions under What else did buyers of X buy at http://www.artfulsoftware.com/infotree/queries.php. PB --- On 3/17/2011 12:00 PM, LAMP wrote: Yes, that was my question. Though, since English is not

Re: Need help with query

2011-03-17 Thread LAMP
First I was thinking there is function IN ALL or something like that, since there are functions IN and EXISTS. And I would be able to make a query something like this select distinct org_id, item_id from orders where item_id in all (34, 36, 58, 63) order by org_id asc But, there

Re: Need help with query

2011-03-15 Thread LAMP
On Mar 15, 2011, at 6:18 PM, Rhino wrote: All you should need is this: select distinct org_id from orders where item_id in (34, 36, 58, 63) I'm assuming that the DISTINCT operator is available in the version of MySQL that you are using. I don't currently have any version of MySQL

Re: Query help

2011-03-02 Thread Claudio Nanni
Hi Neil, select login_id, ip_address from basic_table group by login_id,ip_address having count(login_id,ip_address)1 this should work in case you want to see also the list of emails add: group_concat(email_address,',') as list_of_used_emails to the select fields. Claudio

RE: Query help

2011-03-02 Thread Jerry Schwartz
-Original Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Wednesday, March 02, 2011 6:00 AM To: [MySQL] Subject: Query help Hi I've the following basic table login_id email_address ip_address I want to extract all records from this table in which a user has

Re: Query help

2011-03-02 Thread Tompkins Neil
Thanks for the response. This is what I was after. Although, I am looking to find out the email addresses used to login from the same IP ? On Wed, Mar 2, 2011 at 2:49 PM, Jerry Schwartz je...@gii.co.jp wrote: -Original Message- From: Tompkins Neil

RE: Query help

2011-03-02 Thread Jerry Schwartz
...@googlemail.com] Sent: Wednesday, March 02, 2011 10:12 AM To: Jerry Schwartz Cc: [MySQL] Subject: Re: Query help Thanks for the response. This is what I was after. Although, I am looking to find out the email addresses used to login from the same IP ? On Wed, Mar 2, 2011 at 2:49 PM, Jerry

Re: SELECT Help

2011-02-04 Thread Tompkins Neil
Hi Travis, That query kind of gives me the desired result. However, if is showing me 1, 18, 11, 23, 3, 2010-11-14 17:18:17 record and not 2, 11, 10, 3, 6, 2010-12-20 22:17:13, which is when they changed teams. Any thoughts ? Cheers Neil On Thu, Feb 3, 2011 at 10:32 PM, Travis Ard

RE: SELECT Help

2011-02-03 Thread Travis Ard
Something like this might help you find all of the times where your user_id switched to a different team_id: select team_id, user_id, min(last_changed) from (select home_team_id as team_id, home_user_id as user_id, last_changed from data union all select away_team_id as team_id, away_user_id as

Re: need Help - Mysqldump issue

2010-11-22 Thread Christophe DUMONET
Hello, Thank for your help I just try mysqldump with --quick or --opt option ... to avoid out of memory problem but -- dump fails with --max_allowed_packet=2048M and --quick : r...@pcjahia01:/# /usr/bin/mysqldump -A --max_allowed_packet=2048M --quick --default-character-set=UTF8 -u

Re: Query Help

2010-10-27 Thread Shawn Green (MySQL)
On 10/27/2010 6:55 AM, Nuno Mendes wrote: I have 3 tables: (1) Companies, (2) locations and (3) employees: CREATE TABLE `companies` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(75) NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CREATE TABLE `locations ` ( `id`

Re: Query help

2010-09-06 Thread Ananda Kumar
Tompkins, Which field stores the result of matches. regards anandkl On Mon, Sep 6, 2010 at 4:45 PM, Tompkins Neil neil.tompk...@googlemail.comwrote: Hi, I've the following fields within a table : fixtures_results_id home_teams_id away_teams_id home_goals away_goals home_users_id

Re: Query help

2010-09-06 Thread Tompkins Neil
These two fields home_goals and away_goals Cheers Neil On Mon, Sep 6, 2010 at 12:58 PM, Ananda Kumar anan...@gmail.com wrote: Tompkins, Which field stores the result of matches. regards anandkl On Mon, Sep 6, 2010 at 4:45 PM, Tompkins Neil neil.tompk...@googlemail.com wrote: Hi,

Re: Query help

2010-09-06 Thread Ananda Kumar
Also, can u please lets u know the value's in this table. Just one row, an example would do. regards anandkl On Mon, Sep 6, 2010 at 5:35 PM, Tompkins Neil neil.tompk...@googlemail.comwrote: These two fields home_goals and away_goals Cheers Neil On Mon, Sep 6, 2010 at 12:58 PM,

Re: Query help

2010-09-06 Thread Tompkins Neil
For sure here is some sample data home_teams_id,away_teams_id,home_goals,away_goals,home_users_id,away_users_id 100,200,2,1,5,6 200,100,1,1,6,5 Here is two rows of data for the same fixture both home and away Let me know if you need any more info. Cheers Neil On Mon, Sep 6, 2010 at 1:08 PM,

RE: replication help

2010-08-30 Thread andrew.2.moore
Force all traffic to Node A Break/Stop replication backup Node using mysqldump Restore backup file on Node B Resume replication Install Maatkit Should do the trick... From: ext Norman Khine [nor...@khine.net] Sent: 30 August 2010 15:50 To:

Re: query help

2010-08-21 Thread Travis Ard
Something like this might work: insert into domains select a.accountid, reverse(a.domainid), a.mailname from domains a left outer join domains b on b.domainid = reverse(a.domainid) and b.accountid = a.accountid and b.mailname = a.mailname where b.domainid is null; -Travis

Re: Need Help Writing Simple Query

2010-07-26 Thread Mark Phillips
On Sun, Jul 25, 2010 at 8:49 PM, Nguyen Manh Cuong cuong.m...@vienthongso.com wrote: Hi Mark, Please test this query: select test1.*, (select name from test2 where test2.id=test1.`v_id` limit 1) as name_1, (select name from test2 where test2.id=test1.`h_id` limit 1) as name_2 from test1;

Re: Need Help Writing Simple Query

2010-07-25 Thread Nguyen Manh Cuong
Hi Mark, Please test this query: select test1.*, (select name from test2 where test2.id=test1.`v_id` limit 1) as name_1, (select name from test2 where test2.id=test1.`h_id` limit 1) as name_2 from test1; - test1 table: col1v_idh_id America 1 2 - test2 table: id name 2

Re: Need Help Writing Simple Query

2010-07-25 Thread John List
On 07/25/2010 09:29 PM, Mark Phillips wrote: I have been away from sql for awhile, and can't seem to figure out how to write a simple query for two tables. Table 1 has many columns, two of which are hID and vID. Table 2 has two columns, ID and name. The hID and vID in table 1 correspond to the

RE: Query Help

2010-07-12 Thread Jay Blanchard
[snip] For the life of me I cannot remember how to make a query like this and what it is called. I know it is fairly basic though. Table 1 Product_id Product_Name Table 2 Category_id, Category_name Table 3 Product_id, Category_id Each product can have one or more categories. So I want a

Re: Query Help

2010-07-12 Thread Phillip Baker
Table 1 Product_id | Product_Name 1| Product A 2| Product B 3| Product C Table 2 Category_id | Category_Name 1 | Admin 2 | Marketing 3 | Support 4 | IT Table 3

Re: Query Help

2010-07-09 Thread Michael Satterwhite
I believe you're describing a crosstab query. This should help you put it together: http://rpbouman.blogspot.com/2005/10/creating-crosstabs-in-mysql.html ---Michael On Friday, July 09, 2010 07:37:41 pm Phillip Baker wrote: Hello All, For the life of me I cannot remember how to make a

Re: query help

2010-06-16 Thread Joerg Bruehe
Hi! Jay Blanchard wrote: [snip] I have a table similar to this: - |transactions | |ID |DATE |EMPLOYEE| |234 |2010-01-05| 345| |328 |2010-04-05| 344| |239 |2010-01-10| 344| Is there a way to query such a table to give the

Re: query help

2010-06-16 Thread Richard Reina
Thank you very much for all the insightful replies. I think I can get it to work with a join. Joerg Bruehe joerg.bru...@sun.com wrote: Hi! Jay Blanchard wrote: [snip] I have a table similar to this: - |transactions | |ID |DATE

RE: query help

2010-06-16 Thread Martin Gainty
Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. From: rich...@rushlogistics.com To: joerg.bru...@sun.com; mysql@lists.mysql.com Subject: Re: query help CC: jblanch

RE: query help

2010-06-15 Thread Gavin Towey
Hi Richard, This is a LEFT JOIN, but with only one table you may be wondering what to join. Typically you'll have to create a new table that contains all the dates in the range you want to check. Then you left join your transaction table, and all the rows from your dates table that don't

RE: query help

2010-06-15 Thread Jay Blanchard
[snip] I have a table similar to this: - |transactions | |ID |DATE |EMPLOYEE| |234 |2010-01-05| 345| |328 |2010-04-05| 344| |239 |2010-01-10| 344| Is there a way to query such a table to give the days of the year that employee 344 did

Re: Query Help!

2010-04-27 Thread Johan De Meersman
Hmm. You seem to have overlap, too. I suspect this would be easiest to do in code - the data you're looking for doesn't exist in the data you have, only the opposite of that data does. You could try populating a table with a full day, using the resolution you need (1 minute resolution means 1440

Re: Query Help!

2010-04-27 Thread Jo�o C�ndido de Souza Neto
Not tested, but I think it can help you or at least give you an ideia on how to do it. select EndDateTime + INTERVAL 1 SECOND as startLazy, (select StartDateTime - INTERVAL 1 SECOND from table t2 where t2.StartDateTime t1.EndDateTime limit 1) as endLazy from table t1 where (select

Re: Need help with query optimization

2010-03-17 Thread John Daisley
It may only be returning 51 rows but its having to read significantly more. Get rid of the derived table join if possible. Something like SELECT TAP.ID http://tap.id/, M.UID, TAP.FirstName, TAP.MI, TAP.LastName, TAP.State, TAP.SchoolName, TAP.StateApproved, TAP.DiplomatApproved, C.ChapterType,

Re: Need help with query optimization

2010-03-16 Thread Ananda Kumar
Can you please show us the indexes on both the tables. regards anandkl On Tue, Mar 16, 2010 at 11:47 PM, Jesse j...@msdlg.com wrote: I have the following query: SELECT TAP.ID http://tap.id/, M.UID, TAP.FirstName, TAP.MI, TAP.LastName, TAP.State, TAP.SchoolName, TAP.StateApproved,

RE: query help

2010-02-09 Thread Gavin Towey
SELECT ID, check_no, amount FROM payables UNION SELECT ID, check_no, amount FROM paychecks; Regards, Gavin Towey -Original Message- From: Richard Reina [mailto:rich...@rushlogistics.com] Sent: Tuesday, February 09, 2010 9:23 AM To: mysql@lists.mysql.com Subject: query help I am trying

RE: hi help to take backup-mysql-windows-xp

2010-02-02 Thread John Daisley
What error are you getting? === John Daisley MySQL 5.0 Certified Database Administrator (CMDBA) MySQL 5.0 Certified Developer Cognos BI Developer Telephone: +44(0)1283 537111 Mobile: +44(0)7812 451238 Email: john.dais...@butterflysystems.co.uk === Sent via HP

Re: hi help to take backup-mysql-windows-xp

2010-02-01 Thread Suresh Kuna
Please paste the error and don't give the spave between -p and password. On Tue, Feb 2, 2010 at 12:05 PM, muralikrishna g muralikrishn...@gmail.comwrote: hi to all.. i was in need to take backup of database.. i am using sql server version:5.0.27-coomunity-nt i have tried by using mysqldump

Re: hi help to take backup-mysql-windows-xp

2010-02-01 Thread muralikrishna g
hi to all.. i was in need to take backup of database.. i am using sql server version:5.0.27-coomunity-nt i have tried by using mysqldump -u name -p password database_name backup.sql; but i am getting error.. i am using windows xp system.. please help me mysql mysqldump -u root -p dbadmin murali

Re: hi help to take backup-mysql-windows-xp

2010-02-01 Thread sureshkumarilu
@lists.mysql.com Subject: Re: hi help to take backup-mysql-windows-xp hi to all.. i was in need to take backup of database.. i am using sql server version:5.0.27-coomunity-nt i have tried by using mysqldump -u name -p password database_name backup.sql; but i am getting error.. i am using windows xp

RE: hi help to take backup-mysql-windows-xp

2010-02-01 Thread Parikh, Dilip Kumar
Message- From: sureshkumar...@gmail.com [mailto:sureshkumar...@gmail.com] Sent: Tuesday, February 02, 2010 12:22 PM To: muralikrishna g Cc: mysql@lists.mysql.com Subject: Re: hi help to take backup-mysql-windows-xp Hi Murali, You have to execute it outside mysql prompt i.e command prompt. Thanks

Re: Quick help with Insert

2010-01-21 Thread fsb
where b.lieferant is null -Ursprüngliche Nachricht- Von: Carlos Proal [mailto:carlos.pr...@gmail.com] Bereitgestellt: Dienstag, 19. Jänner 2010 20:15 Bereitgestellt in: gmane.comp.db.mysql.general Unterhaltung: Quick help with Insert Betreff: Re: Quick help with Insert Hi

Re: Quick help with Insert

2010-01-19 Thread Intell! Soft
Hey Not really quick ; - But nobody knows an answer? THX -Ursprüngliche Nachricht- Von: Intell! Soft [mailto:intellis...@fachoptiker.net] Bereitgestellt: Donnerstag, 14. Jänner 2010 17:40 Bereitgestellt in: gmane.comp.db.mysql.general Unterhaltung: Quick help with Insert Betreff:

Re: Quick help with Insert

2010-01-19 Thread Carlos Proal
Hi !! You need a left join and then an insert. Please read: http://dev.mysql.com/doc/refman/5.1/en/join.html or google for tutorials on left join And tell me if you have further questions Carlos On 1/19/2010 1:00 PM, Intell! Soft wrote: Hey Not really quick ; - But nobody knows an

Re: Quick help with Insert

2010-01-19 Thread Intell! Soft
...@gmail.com] Bereitgestellt: Dienstag, 19. Jänner 2010 20:15 Bereitgestellt in: gmane.comp.db.mysql.general Unterhaltung: Quick help with Insert Betreff: Re: Quick help with Insert Hi !! You need a left join and then an insert. Please read: http://dev.mysql.com/doc/refman/5.1/en/join.html or google

RE: Query help

2009-12-13 Thread Jason Trebilcock
Depending on whether you just need to count or the transaction numbers, one of the following three should get you where you want/need to be: To identify the count for comp_id = 675: select count(distinct trans_no) from trans where comp_id = 675 and result = 'o'; To identify the transactions:

Re: Query help

2009-12-13 Thread Colin Streicher
On December 13, 2009 01:36:41 pm Richard Reina wrote: I was wondering if someone could lend a hand with the following query. I have table. SEARCHES |ID |trans_no|comp_id|result 13 | 455| 675| o 15 | 302| 675| o 16 | 455| 675| o 12 | 225| 629|

Re: Query help

2009-12-13 Thread DaWiz
SELECT count(distinct trans_no) from SEARCHES WHERE comp_id=675 and result='o'; - Original Message - From: Richard Reina rich...@rushlogistics.com To: mysql@lists.mysql.com Cc: rich...@rushlogistics.com Sent: Sunday, December 13, 2009 11:36 AM Subject: Query help I was wondering if

RE: Fwd: Help with Timestamp invalid value error

2009-09-04 Thread John Daisley
Is your table innodb? If so i think the 'STRICT_TRANS_TABLES' sql_mode 'may' be causing the problem. Try inserting the value as '2008-03-09 02:56:34.737' Do you get the same error? What mysql version is your server? Regards John Daisley Mobile +44(0)7812 451238 Email

Re: Fwd: Help with Timestamp invalid value error

2009-09-04 Thread Proemial
I had already tried that, actually. Produces the same error. I should have mentioned that as well, sorry! The version is 5.1.34 thanks for the help, btw! Martin On Fri, Sep 4, 2009 at 11:14 AM, John Daisleyj...@butterflysystems.co.uk wrote: Is your table innodb? If so i think the

RE: Fwd: Help with Timestamp invalid value error

2009-09-04 Thread Gavin Towey
Mysql doesn't store sub-second values. try 2008-03-09 02:56:34 Instead of 2008-03-09 02:56:34.737 Regards, Gavin Towey -Original Message- From: Proemial [mailto:proem...@gmail.com] Sent: Friday, September 04, 2009 8:37 AM To: John Daisley Cc: mysql@lists.mysql.com Subject: Re: Fwd: Help

Re: need help with relational tables/fields

2009-09-03 Thread Wolfgang Schaefer
AndrewJames schrieb: Hey, i have a table called users which has my users in it, each have a uid field. I also have a stories table which has stories in it each with a sid field for each story but also a uid field so i know which user the story belongs to. i want to write a query that

Re: need help with relational tables/fields

2009-09-03 Thread Wolfgang Schaefer
AndrewJames schrieb: Hey, i have a table called users which has my users in it, each have a uid field. I also have a stories table which has stories in it each with a sid field for each story but also a uid field so i know which user the story belongs to. i want to write a query that

Re: need help with relational tables/fields

2009-09-03 Thread Wolfgang Schaefer
AndrewJames schrieb: Hey, i have a table called users which has my users in it, each have a uid field. I also have a stories table which has stories in it each with a sid field for each story but also a uid field so i know which user the story belongs to. i want to write a query that

Re: recovery help needed

2009-08-26 Thread Martijn Engler
I actually get the feeling you are not connecting as root. Try mysql -uroot -p test instead of just mysql test Have a nice day, - Martijn On Wed, Aug 26, 2009 at 03:02, Joemysql@bluepolka.net wrote: OK, thanks, that got me in.  But upon inspection, the user.host values do not look fouled

Re: recovery help needed

2009-08-26 Thread prabhat kumar
Step # 1 : Stop mysql service # /etc/init.d/mysql stop Step # 2: Start to MySQL server w/o password: # mysqld_safe --skip-grant-tables Step # 3: Connect to mysql server using mysql client: # mysql -u root Step # 4: Setup new MySQL root user password mysql use mysql; mysql update user set

Re: recovery help needed

2009-08-25 Thread Walter Heck - OlinData.com
Hey Joe, stop the server, start it with --skip-grant-tables, change the root entry in mysql.user to your liking, and then restart the server without --skip-grant-tables. viola! Walter On Wed, Aug 26, 2009 at 02:12, Joemysql@bluepolka.net wrote: We have an inaccessible MySQL v5.0.45 DB

Re: recovery help needed

2009-08-25 Thread Carlos Proal
You have to reset the permissions. http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html Carlos On 8/25/2009 7:12 PM, Joe wrote: We have an inaccessible MySQL v5.0.45 DB (w/Innodb) we really need some help regaining access to. While attempting to adjust/add remote user access,

Re: recovery help needed

2009-08-25 Thread Joe
OK, thanks, that got me in. But upon inspection, the user.host values do not look fouled up as I thought they were (it appears the bogus update may have aborted). But my access problem remains If I start with --skip-grant-tables, 'show databases' shows all DBs. But without that flag, I

Re: recovery help needed

2009-08-25 Thread Todd Lyons
On Wed, Aug 26, 2009 at 02:12, Joemysql@bluepolka.net wrote: We have an inaccessible MySQL v5.0.45 DB (w/Innodb) we really need some help regaining access to.  While attempting to adjust/add remote user access, we accidentally did the following:  use mysql;  update user set

R: Re: recovery help needed

2009-08-25 Thread Claudio Nanni
When you are in without the flag , issue the following: Select current_user(); It should return root. Then do this: Grant all privileges on *.* 'root'@'%' identified by 'letmein' It should work If you did not mess too much with grant tables. Claudio Il giorno 26 ago, 2009 4:36 m., Todd Lyons

Re: Need help with mysql prob

2009-04-20 Thread Andy Shellam
Hi, abdulazeez alugo wrote: Date: Sun, 19 Apr 2009 23:19:56 +0100 From: andy-li...@networkmail.eu To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Need help with mysql prob Hi Alugo, Hi Andy, Thanks for your prompt response. However, since tbl1_id has

RE: Need help with mysql prob

2009-04-20 Thread abdulazeez alugo
Date: Mon, 20 Apr 2009 08:06:05 +0100 From: andy-li...@networkmail.eu To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Need help with mysql prob Hi, abdulazeez alugo wrote: Date: Sun, 19 Apr 2009 23:19:56 +0100 From: andy-li...@networkmail.eu To: defati

Re: Need help with mysql prob

2009-04-20 Thread Andy Shellam
Hi Alugo, abdulazeez alugo wrote: Hi Andy, Thank you very much you have been really very helpful. All those mistakes you pointed at in the script about the apostrophe and others, are simple mistakes I just made in the rush of typing the message; and yes $conn is the result from

RE: Need help with mysql prob

2009-04-20 Thread abdulazeez alugo
Date: Mon, 20 Apr 2009 13:03:14 +0100 From: andy-li...@networkmail.eu To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Need help with mysql prob Hi Alugo, abdulazeez alugo wrote: Hi Andy, Thank you very much you have been really very helpful. All those mistakes

Re: Need help with mysql prob

2009-04-19 Thread Andy Shellam
Hi, Now I have successfully created a relationship between the two tables but how do I make sure the value of tbl1_id in tbl1 is equal to the value of tbl1_id in tbl2??? MySQL handles this for you. Simply INSERT the value into tbl1, then INSERT the value of tbl1_id in tbl2. Then try

RE: Need help with mysql prob

2009-04-19 Thread abdulazeez alugo
Date: Sun, 19 Apr 2009 22:50:20 +0100 From: andy-li...@networkmail.eu To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Need help with mysql prob Hi, Now I have successfully created a relationship between the two tables but how do I make sure the value of tbl1_id

Re: Need help with mysql prob

2009-04-19 Thread Andy Shellam
Hi Alugo, Hi Andy, Thanks for your prompt response. However, since tbl1_id has an auto_increment value in tbl1, mysql is actually generating the values for it automatically. Ah, I see your point. I'm guessing by your code you're using PHP? If so call mysql_insert_id() after you've

Re: Need help with mysql prob

2009-04-19 Thread Tom Nugent
Hi Abdul- you may want to check this thread out regarding the same issue... http://www.webmasterworld.com/php/3565843.htm On Apr 19, 2009, at 3:23 PM, abdulazeez alugo wrote: Hi guys, I'm having a really terrible problem with my mysql coding and I'ld appreciate any help I can get on

RE: Need help with mysql prob

2009-04-19 Thread abdulazeez alugo
Date: Sun, 19 Apr 2009 23:19:56 +0100 From: andy-li...@networkmail.eu To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Need help with mysql prob Hi Alugo, Hi Andy, Thanks for your prompt response. However, since tbl1_id has an auto_increment value in tbl1

RE: Please help me.

2009-03-19 Thread Muthukumar Selvarasu
; mysql@lists.mysql.com Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com Subject: RE: Please help me. Velentin, http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html Note the section for the droping of foreign keys used the contraint name, not the key name. Try

RE: Please help me.

2009-03-18 Thread Gary Smith
Velentin, http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html Note the section for the droping of foreign keys used the contraint name, not the key name. Try this and see if it solves the first problem (of removing the constraint). Then you should be able to drop the

RE: Query Help

2009-02-10 Thread Ben Wiechman
in question the information is returned. This produces too many results as some of those users have since migrated to a different access point. -Original Message- From: Andrew Wallo [mailto:theme...@microneil.com] Sent: Tuesday, February 10, 2009 12:05 PM To: Ben Wiechman Subject: Re: Query Help

RE: Query Help

2009-02-10 Thread Ben Wiechman
Alright to reply to myself I can return the information but have been unable to return the last row... instead it always returns the first row. Tried max, tried min, tried converting the datetime to a timestamp with the same results... mysql SELECT da_userinfo.UserName, da_userinfo.Name,

RE: Query Help

2009-02-10 Thread ddevaudreuil
Ben Wiechman b...@meltel.com wrote on 02/10/2009 01:30:14 PM: Thanks for the input! That is close to what I need, however not exactly. It will give me the last time a user logged into the host in question but I want to prune users who have since logged into a different host. Basically find

RE: Query Help

2009-02-10 Thread Ben Wiechman
: mysql@lists.mysql.com Subject: RE: Query Help Ben Wiechman b...@meltel.com wrote on 02/10/2009 01:30:14 PM: Thanks for the input! That is close to what I need, however not exactly. It will give me the last time a user logged into the host in question but I want to prune users who have since

Re: need help with query...

2008-12-17 Thread Jason Pruim
On Dec 17, 2008, at 2:56 PM, Lamp Lists wrote: I hate when somebody put in Subject line something like I just did but after 15 minutes to try to be specific just with one short sentence - I gave up. So, you can hate me - I understand (though, help with my problem too) :-) I have let

Re: need help with query...

2008-12-17 Thread Andy Shellam
Hi Afan Why not prefix your field names with the table name? select p.first_name AS person_first_name, p.last_name AS person_last_name, p.status AS person_status, p.date_registered AS person_date_registered, o.org_id AS organization_org_id, o.org_name AS organization_org_name,

RE: need help with query...

2008-12-17 Thread Jerry Schwartz
-Original Message- From: Lamp Lists [mailto:lamp.li...@yahoo.com] Sent: Wednesday, December 17, 2008 2:57 PM To: mysql@lists.mysql.com Subject: need help with query... ...snip... I have let say 3 tables people, organization, addresses. and they are linked to each other with column

RE: need help with query...

2008-12-17 Thread Jerry Schwartz
-Original Message- From: Andy Shellam [mailto:andy-li...@networkmail.eu] Sent: Wednesday, December 17, 2008 3:29 PM To: Lamp Lists Cc: mysql@lists.mysql.com Subject: Re: need help with query... Hi Afan Why not prefix your field names with the table name? select p.first_name

Re: need help with query...

2008-12-17 Thread Lamp Lists
From: Andy Shellam andy-li...@networkmail.eu To: Lamp Lists lamp.li...@yahoo.com Cc: mysql@lists.mysql.com Sent: Wednesday, December 17, 2008 2:29:08 PM Subject: Re: need help with query... Hi Afan Why not prefix your field names with the table name? select

Re: need help with query...

2008-12-17 Thread Andy Shellam
Jerry Schwartz wrote: -Original Message- From: Andy Shellam [mailto:andy-li...@networkmail.eu] Sent: Wednesday, December 17, 2008 3:29 PM To: Lamp Lists Cc: mysql@lists.mysql.com Subject: Re: need help with query... Hi Afan Why not prefix your field names with the table name? select

Re: need help with query...

2008-12-17 Thread Andy Shellam
Hi, Hi Andy, the reason I can't use this because fields (columns) in select statement (p.first_name, p.last_name,...) are actually dynamically created. In my project different client will select different fields to be shown. 99% will select first_name, and last_name, but some don't care

Re: need help with query...

2008-12-17 Thread Lamp Lists
From: Andy Shellam andy-li...@networkmail.eu To: Lamp Lists lamp.li...@yahoo.com Cc: mysql@lists.mysql.com Sent: Wednesday, December 17, 2008 2:48:31 PM Subject: Re: need help with query... Hi, Hi Andy, the reason I can't use this because fields (columns

Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn format SOLVED

2008-12-03 Thread Paul Nowosielski
This seems to do it: SELECT phone_work FROM leads WHERE phone_work REGEXP '[(]{1}([0-9]){3}[)]{1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}' - Original Message From: Paul Nowosielski [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, December 3, 2008 2:39:54 PM

Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn format

2008-12-03 Thread wim . delvaux
On Wednesday 03 December 2008 08:39:54 Paul Nowosielski wrote: Hi, Please, can anyone lend a hand in helping pullout phone numbers from the DB that only match the format (nnn) nnn- ? ([0-9]{3}) [0-9]{3}-[0-9]{4} I think HTH W SELECT phone_work FROM leads WHERE phone_work REGEXP

Re: Need Help

2008-11-24 Thread Jim Lyons
what rate of pay are you offering? On Mon, Nov 24, 2008 at 5:13 AM, Tanveer Bhurani [EMAIL PROTECTED]wrote: Dear All, I am looking for help as I want to make a website like orkut. can u plz help me in designing the Data Table and Queries -- Thanks Regards, Tanveer Bhurani The Bend on

Re: Need Help Migrating DB from MySQL 5.0.x to MySQL 4.0.x

2008-09-05 Thread Werner D.
Shaun Adams schrieb: When I perform a dump in mysql5 to mysql 4 DB, I get the error (below). Does anyone know how I can resolve this? QUERY (windows server from the cmd prompt) mysqldump --lock-tables --user=root [SOURCE DB] | mysql --user=[USERNAME] --password=[PASSWORD]

Re: Need help to query with timestamp in C++

2008-08-15 Thread Kandy Wong
Hi Saul, I need to use C++ and I'm not writing a web application. Thanks anyway. Kandy I have done queries to the database in PHP with variables like month but easily can select from a range of time and data to produce the same results, the output goes directly to the web so if that is what

Re: Need help to query with timestamp in C++

2008-08-15 Thread Dušan Pavlica
Hi Kandy, this could be the query you are looking for. It should return record with the closest timestamp to your required time: (SELECT TIMEDIFF('20080815091907', timestamp_column) AS diff, t.* FROM table1 t WHERE timestamp_column = '20080815091907' ORDER BY timestamp_column DESC LIMIT 1 )

Re: Need help to query with timestamp in C++

2008-08-15 Thread walter harms
Kandy Wong wrote: Hi Saul, I need to use C++ and I'm not writing a web application. Thanks anyway. you can do something like: select min(abs(timediff(targettime,timestamp))) from table where condition ; if you use the libmysql you can get the result as strings back (the method i

<    1   2   3   4   5   6   7   8   9   10   >