need help with relational tables/fields

2009-09-03 Thread AndrewJames
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 will display the story

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

Need help with mysql prob

2009-04-19 Thread abdulazeez alugo
Hi guys, I'm having a really terrible problem with my mysql coding and I'ld appreciate any help I can get on this cause it's really driving me crazy. I have two tables and I've succeeded in creating a one to many relationship between both table but the problem I'm having is that I dont know

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

need help with query...

2008-12-17 Thread Lamp Lists
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 say 3 tables people, organization, addresses. and they

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

Need help compiling v5.1.30 on tru64 5.1b

2008-12-17 Thread Didier Godefroy
Hello all, I get this error when compiling: Object file format error in: /usr/sw: read_cur_obj_info: File is not a regular file I have the same thing in /usr/sw as you'd find in /usr/local I'm using gcc 4.0.2 and the tru64 native compiler. I tried taking off a few configure directives, such as

Need help with permissions between host, db and user tables

2008-12-10 Thread Vikram Vaswani
Hi, I'm trying to customize permissions for a particular database and have run into an odd problem. I'm hoping someone on this list can suggest what I'm doing wrong. The setup is as follows: Database: property User '[EMAIL PROTECTED]' should be able to run SELECTs on this database User '[EMAIL

Need Help

2008-11-24 Thread Tanveer Bhurani
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 the road is not the end of the Road..., Unless you forget to make the turn

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

Need help executing mysql stress test suite

2008-10-19 Thread Durga Prasad P V
Hi, For mysql stress test suite (mysql-stress-test.pl) to execute, it requires --stress-tests-file to be provided which contains the list of tests to be executed. As per the documentation the default name of the file is stress-test.txt and it will be located under ./mysql-test directory. But I

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

2008-09-05 Thread Shaun Adams
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] --host=[HOST] [TARGET DB] ERROR

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

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

2008-08-15 Thread Warren Young
Kandy Wong wrote: And what is the good connector (C++ to MySQL) to use? MySQL++ (http://tangentsoft.net/mysql++/) has native Date, Time, and DateTime data types. You can convert to these types implicitly: mysqlpp::DateTime dt = row[my_column]; Row::operator[] doesn't return

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

2008-08-15 Thread Jerry Schwartz
PROTECTED] Sent: Friday, August 15, 2008 2:36 AM To: Saul Bejarano Cc: mysql@lists.mysql.com Subject: Re: Need help to query with timestamp in C++ 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

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

2008-08-15 Thread Kandy Wong
Hi Dusan, Thank you so much. It works! Kandy 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 =

Need help to query with timestamp in C++

2008-08-14 Thread Kandy Wong
Hi, I need to write a C++ program in a Linux environment to query with a timestamp. The user will only provide with an approximate time so I'd like to know how can I write a program or a query to return the closest data. The followings are the timestamp in the MySQL database: | 2008-08-05

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

2008-08-14 Thread Saul Bejarano
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 you are seeking for, I can help with PHP. Saul Kandy Wong wrote: Hi, I need to write

Need help figuring out mk-table-checksum

2008-07-17 Thread Jesse
I want to make sure that my master and slave machines are in sync. From what I hear, mk-table-checksum is a good way to do that. So, I downloaded and installed it on my Linux box (the slave). So, here's what I've got: WS2003 Master (IP 192.168.1.10) Ubuntu 8.04 Linux Slave (IP

Re: Need help to locate SetSRID(),Makebox2D(),Distance_Sphere()

2008-02-05 Thread Anders Karlsson
Rakesh! The distance_sphere and makebox2d functions are specific to postgis. MySQL GIS Implementation is based on the Open GIS Simple SQL Specification (read more on www.opengeospatial.com). The SetSRID is also not in the specification as far as I know (it should be, but I can't find it),

Need help to locate SetSRID(),Makebox2D(),Distance_Sphere()

2008-02-04 Thread rakesh.gupta1
Hi All I looking for the stated functions. Earlier I was using postGIS in that they are present i am wondering if I can get similar kind of method in MySql.I am Using Mysql 5.0.51a version. 1. I am trying to retrieve the distance between two geometries in the table using the following

executing query from the command line -- need help

2008-01-23 Thread Brown, Charles
Hello All. I'm new to mysql. I would like to issue a query from the command line and pass the result to an update done on the command line within the same script. See below. My question is how can I run a select from the command line and pass the values to an update SELECT SYS_ID, SYS_LOCATION,

RE: executing query from the command line -- need help

2008-01-23 Thread Jay Blanchard
[snip] I'm new to mysql. I would like to issue a query from the command line and pass the result to an update done on the command line within the same script. See below. My question is how can I run a select from the command line and pass the values to an update SELECT SYS_ID, SYS_LOCATION,

RE: executing query from the command line -- need help

2008-01-23 Thread Jay Blanchard
[snip] SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER; UPDATE TEST_SERVER SET SYS_ID = value passed from above SYS_LOCATION = value passed from above SYS_IPADDRESS = value passed from above; [/snip] And here http://dev.mysql.com/doc/refman/5.1/en/user-variables.html --

RE: executing query from the command line -- need help

2008-01-23 Thread Jay Blanchard
: executing query from the command line -- need help [snip] SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER; UPDATE TEST_SERVER SET SYS_ID = value passed from above SYS_LOCATION = value passed from above SYS_IPADDRESS = value passed from above; [/snip] And here http

Re: executing query from the command line -- need help

2008-01-23 Thread obed
, 2008 11:29 AM To: Brown, Charles; mysql@lists.mysql.com Subject: RE: executing query from the command line -- need help [snip] SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER; UPDATE TEST_SERVER SET SYS_ID = value passed from above SYS_LOCATION = value passed from above

RE: executing query from the command line -- need help

2008-01-23 Thread Brown, Charles
thanks -Original Message- From: obed [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 23, 2008 10:49 PM To: Jay Blanchard Cc: Brown, Charles; mysql@lists.mysql.com Subject: Re: executing query from the command line -- need help On Jan 23, 2008 2:36 PM, Jay Blanchard [EMAIL PROTECTED

need help to use java to connect to MYSQL DB

2007-11-29 Thread Eman Hossny
Hi all, i need to use Eclipse(java SDK) to connect to MYSQL DB, i write the following code for connection, but when i run it no thing happen, no output appear, when i debug it, i found that the debuger was stopped @ the line conn=DriverManager.getConnection(connectionURL,Eman,Eman);

Re: Need help creating query statement

2007-11-07 Thread Néstor
Guys, just wanted to thank you again for helping me with the sql statement that I needed. I was able to sorted using php and I was able to display the correct result. Thanks again!!1 Nestor :-) On Nov 6, 2007 7:37 AM, Néstor [EMAIL PROTECTED] wrote: You guys are correct, that is exactly what

Re: Need help creating query statement

2007-11-06 Thread Enrique Sanchez Vela
--- [EMAIL PROTECTED] wrote: Néstor wrote: I think you'd best begin by normalising your database. Something along these lines: very true indeed, that would save you major headaches when right after finishing the demo, someone would say, can we add a 18 gallon pledge? what about a 25?

Re: Need help creating query statement

2007-11-06 Thread Néstor
You guys are correct, that is exactly what happened. I must thing of this in the future. At this moment I have a lot of other projects to take care, that it is eaiser for me to read the information into an associative array with the columns and the values and sort the array and then print the

Need help creating query statement

2007-11-05 Thread Néstor
I can do simple select statements but I need your brains to create query statment. I am using mysql 4.0 in my 1and1 site. I have a table that has 8 fields, one is the agency field and the other 7 are *tip* values on saving water and the value of this field is either 0 or an amount.

Need help to create a query

2007-11-05 Thread Néstor
I have a table with about 9 fields, and record ID field an agency name field and the # of gallons that a erson pledges to save: -- |ID| agency| 5g | 8g | 10g | 12g | 15g | 18g | 20g |

Fwd: Re: Need help creating query statement

2007-11-05 Thread Enrique Sanchez Vela
--- Enrique Sanchez Vela [EMAIL PROTECTED] wrote: Date: Mon, 5 Nov 2007 15:01:59 -0800 (PST) From: Enrique Sanchez Vela [EMAIL PROTECTED] Subject: Re: Need help creating query statement To: Néstor [EMAIL PROTECTED] --- Néstor [EMAIL PROTECTED] wrote: I can do simple select

Re: Need help creating query statement

2007-11-05 Thread Néstor
Enrique that is pretty good and close to what I need. On top of what you have generously provide, I guess I can just put each gallon field into an array an then sort the array to display the first 5 gallon fields per agency. Is there an easier way? Thanks, Nestor :-) On 11/5/07, Enrique

Re: Need help creating query statement

2007-11-05 Thread mysql
Néstor wrote: I can do simple select statements but I need your brains to create query statment. I am using mysql 4.0 in my 1and1 site. I have a table that has 8 fields, one is the agency field and the other 7 are *tip* values on saving water and the value of this field is either 0 or an

Need help with a sql query

2007-10-21 Thread Imran
Hello all: I have two tables: 1. MenuAccess: accessId fkMenuId fkGroupid View Execute 2. MenuOptions MenuId MenuName I would like to get all of the records in MenuOptions and any record in MenuAccess with a specific fkGroupid. For example: A. MenuAccess

Re: Need help with a sql query

2007-10-21 Thread mysql
Imran wrote: Hello all: ... I would like to get all of the records in MenuOptions and any record in MenuAccess with a specific fkGroupid. For example: ... IIf I run a query for fkgroupid = 1 I should get AccessId fkMenuID fkgroupid view execute

Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Daevid Vincent
I'm trying to get some 'release/version numbers' to sort properly. mysql SELECT ReleaseID, Name FROM releases ORDER BY Name DESC; +---+-+ | ReleaseID | Name| +---+-+ |18 | Unspecified | |20

Re: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Jay Pipes
Daevid Vincent wrote: I'm trying to get some 'release/version numbers' to sort properly. mysql SELECT ReleaseID, Name FROM releases ORDER BY Name DESC; +---+-+ | ReleaseID | Name| +---+-+ |18 |

RE: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Daevid Vincent
-Original Message- From: Jay Pipes [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 2:07 PM To: Daevid Vincent Cc: mysql@lists.mysql.com Subject: Re: Need help with a natural sort order for version numbers and release code names Daevid Vincent wrote: I'm trying

Re: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Adam Randall
Here's my full test solution: use test; drop table if exists releases; create temporary table releases ( releaseid int(10) unsigned not null auto_increment primary key, name varchar(255) )engine=myisam; insert into releases ( name ) values ( 'Unspecified' ), ( 'Next Patch' ), (

Re: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Adam Randall
Oh, and here's the output (Sorry): +---+-+ | releaseid | name| +---+-+ | 1 | Unspecified | | 2 | Next Patch | | 3 | LOCset | | 4 | Abashiri| |

need help with delete query

2007-06-14 Thread Ben Liu
I'm trying to delete a subset of items in a table. The problem is, I don't want to query for the subset first, store the results and then run a series of delete queries. I believe this is a rather basic issue that has a well-accepted, simple solution which I am ignorant of. There are two relevant

Re: need help with delete query

2007-06-14 Thread Ben Liu
Thanks Brent, good tip. Works like a charm. On Jun 14, 2007, at 7:42 PM, Brent Baisley wrote: Here's a little trick. Get your DELETE query working as a SELECT. Then replace everything before FROM with DELETE tablename. SELECT order_items.ord_id FROM order_items LEFT JOIN orders ON

Re: need help with delete query

2007-06-14 Thread Reinhardt Christiansen
- Original Message - From: Ben Liu [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, June 14, 2007 3:11 PM Subject: need help with delete query I'm trying to delete a subset of items in a table. The problem is, I don't want to query for the subset first, store the results

Re: need help...LOAD DATA INFILE

2007-05-21 Thread Ananda Kumar
Hi All, I was able to load data properly. We need to set the parameter set session collation_database=latin1_swedish_ci; set session character_set_database=latin1; please check this url for more info http://lists.mysql.com/commits/16915 On 5/19/07, Ananda Kumar [EMAIL PROTECTED] wrote: Hi

need help...LOAD DATA INFILE

2007-05-19 Thread Ananda Kumar
Hi All, I am loading data into mysql database using LOAD DATA INFILE. After the load i am getting this error. Warning | 1366 | Incorrect string value: '\xE9cor' for column 'CATEGORY_NAME' at row 2137 . My database character set is as below character_set_database | utf8 character_set_client

Re: need help...LOAD DATA INFILE

2007-05-19 Thread Ananda Kumar
Also friends, When i see this data in the vi editor it looks like this Other Home DÃ(c)cor Just wanted to give information. Please help me. regards anandkl On 5/19/07, Ananda Kumar [EMAIL PROTECTED] wrote: Hi All, I am loading data into mysql database using LOAD DATA INFILE. After the load

Need help with query

2007-05-01 Thread Jesse
The following query works just fine: SELECT B.BusNum, COALESCE(CampCount.Cnt,0) As Kids, B.CamperCapacity, COALESCE(CounselorCount.Cnt,0) As Adults, B.AdultCapacity FROM Buses B LEFT JOIN (SELECT BusID,Count(*) As Cnt FROM Campers GROUP BY BusID) AS CampCount ON CampCount.BusID=B.ID LEFT

Re: Need help with query

2007-05-01 Thread Baron Schwartz
Hi Jesse, Jesse wrote: The following query works just fine: SELECT B.BusNum, COALESCE(CampCount.Cnt,0) As Kids, B.CamperCapacity, COALESCE(CounselorCount.Cnt,0) As Adults, B.AdultCapacity FROM Buses B LEFT JOIN (SELECT BusID,Count(*) As Cnt FROM Campers GROUP BY BusID) AS CampCount ON

Re: Need help with query

2007-05-01 Thread Jesse
COALESCE(CampCount.Cnt,0) + COALESCE(CounselorCount.Cnt,0) as GT Duuuh. Why didn't I think of that. What is MySQL's issue with referring to the variables (As assignments, whatever you want to call them)? I've had issues like this in situations like this one, when trying to use them in the

Re: Need help with query

2007-05-01 Thread Mark Leith
Jesse wrote: COALESCE(CampCount.Cnt,0) + COALESCE(CounselorCount.Cnt,0) as GT Duuuh. Why didn't I think of that. What is MySQL's issue with referring to the variables (As assignments, whatever you want to call them)? I've had issues like this in situations like this one, when trying to

Need help in Procedure

2007-04-25 Thread balaraju mandala
Hi All, This is my procedure, i am using cursor to access data one row by one. The cursor is looping twice, though i have only one row data in the DB table(playersloginfo). Can any body tell me why cursor is looping twice and how can i control it, And please explain me what is this declare

need help urgent

2007-03-30 Thread raksha
this message in context: http://www.nabble.com/need-help-urgent-tf3491135.html#a9749875 Sent from the MySQL - General mailing list archive at Nabble.com.

Re: need help urgent

2007-03-30 Thread Ananda Kumar
://www.nabble.com/need-help-urgent-tf3491135.html#a9749875 Sent from the MySQL - General mailing list archive at Nabble.com.

Re: need help urgent

2007-03-30 Thread Ananda Kumar
name is ID and I want to retrieve data from another field LAT such that at a time LAT values for ID's 1,2,3 are taken then for 3,4,5 then for 4,5,6 so on till table ends. -- View this message in context: http://www.nabble.com/need-help-urgent-tf3491135.html#a9749875 Sent from the MySQL

Mandriva 2007 rpm's hosed - Detailed procedural info included - Need help badly

2007-01-30 Thread Jim C.
[EMAIL PROTECTED] jim]# mysqladmin -u [EMAIL PROTECTED] password new_password mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation' HUH? What's wrong? : [EMAIL PROTECTED] jim]# mysql -u [EMAIL PROTECTED] Welcome to the MySQL

[ SOLVED I think ] Re: Mandriva 2007 rpm's hosed - Detailed procedural info included - Need help badly

2007-01-30 Thread Jim C.
OK, I think we've solved this one. Procedure: [EMAIL PROTECTED] ~]# urpme MySQL-client MySQL MySQL-common [EMAIL PROTECTED] ~]# mv /var/lib/mysql /var/lib/mysql.old [EMAIL PROTECTED] ~]# urpmi MySQL-client-5.0.27-3mdv2007.1 MySQL-5.0.27-3mdv2007.1 MySQL-common-5.0.27-3mdv2007.1 This series

SELECT from 3 tables - Need help

2007-01-18 Thread Nuno Oliveira
Hi All, I'm working on a Intranet database with a few tables to allow all the workers from the company to access it. However, I'm facing a problem with a QUERY. I've did try to use JOIN but I'm not able to get the results I need... I have 3 tables (concerning this problem): Table 'Quotes'

Re: SELECT from 3 tables - Need help

2007-01-18 Thread Davor Dundovic
I would like to do a SELECT that would return all the fields in the 'Quotes' table plus the client info and plus the product info but only if available. If product info is not available I would like to get a result having all 'Quotes' info and 'Clients' info. My query is: SELECT * FROM

Re: SELECT from 3 tables - Need help

2007-01-18 Thread Nuno Vaz Oliveira
From Davor: Try this: SELECT * FROM `Quotes` LEFT OUTER JOIN `Products` ON (`Products`.`QuoteID`=`Quotes`.`QuoteID`) LEFT OUTER JOIN `Clientes` ON (`Clientes`.`ClientID`=`Quotes`.`ClientID`) WHERE `Quotes`.`QuoteID`=6936 Dundo Still the same... :( When a QuoteID from Quotes is not available

Re: SELECT from 3 tables - Need help

2007-01-18 Thread Nuno Oliveira
Olexandr Melnyk wrote: I din't know about listiтg multiple tables in the JOIN clause up to now, but anyways it looks like QuoteId from the Products table is overriding the same field from the Quotes table. Try to replace the asterisk with an explicit list of fields you want to get. Hi,

RE: SELECT from 3 tables - Need help

2007-01-18 Thread Chris Boget
Do you mean that I should replace SELECT * FROM with SELECT field1, [field2],[...] FROM? Yes. If so, I need to specify the table name like SELECT Clients.Name correct? You only need to do that when 2 tables have the same column name. In general, though, it's good practice to always

RE: SELECT from 3 tables - Need help

2007-01-18 Thread Nuno Vaz Oliveira
From Chris, Do you mean that I should replace SELECT * FROM with SELECT field1, [field2],[...] FROM? Yes. If so, I need to specify the table name like SELECT Clients.Name correct? You only need to do that when 2 tables have the same column name. In general, though, it's good practice to

Re: SELECT from 3 tables - Need help

2007-01-18 Thread Olexandr Melnyk
2007/1/18, Nuno Oliveira [EMAIL PROTECTED]: Hi, thanks for the reply (you should reply to the list also) Heh, that was the default Gmail behaviour. Do you mean that I should replace SELECT * FROM with SELECT field1, [field2],[...] FROM? It is generally a good pratice to keep away from

RE: Error. Need help (Bad arguments.)

2006-12-04 Thread John Trammell
Sounds more like a PHP error than a MySQL error. -Original Message- From: John [mailto:[EMAIL PROTECTED] Sent: Monday, December 04, 2006 12:53 AM To: mysql@lists.mysql.com Subject: Error. Need help (Bad arguments.) I get this error: Warning: implode(): Bad arguments. in /home/b/cl

Error. Need help (Bad arguments.)

2006-12-03 Thread John
I get this error: Warning: implode(): Bad arguments. in /home/b/cl/TP2/admin/defaults.php on line 102 102-104 Code is: { $cat_array=explode(:,$_POST['cat_str']); } Ideas?

need help on before insert trigger

2006-10-07 Thread Patrick Aljord
I would like to prohibit the value 'xxx' on my column title, and if it does contain the value I would like to create an exception by assigning 'xxx' to the primary key id which is int(5). This is what I do but I get an error on its creation so I guess it's not the right way: CREATE TRIGGER

Re: need help on before insert trigger

2006-10-07 Thread Paul DuBois
At 16:23 +0200 10/7/06, Patrick Aljord wrote: I would like to prohibit the value 'xxx' on my column title, and if it does contain the value I would like to create an exception by assigning 'xxx' to the primary key id which is int(5). This is what I do but I get an error on its creation so I

Re: need help on before insert trigger

2006-10-07 Thread Mark Leith
Hi Patrick, Patrick Aljord wrote: I would like to prohibit the value 'xxx' on my column title, and if it does contain the value I would like to create an exception by assigning 'xxx' to the primary key id which is int(5). This is what I do but I get an error on its creation so I guess it's not

Re: need help on before insert trigger

2006-10-07 Thread Patrick Aljord
I meant the error is: mysql CREATE TRIGGER testref BEFORE INSERT ON bookmarks - FOR EACH ROW - BEGIN - IF NEW.title LIKE '%xxx%' THEN - SET NEW.id ='xxx'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for

Re: need help on before insert trigger

2006-10-07 Thread Patrick Aljord
thanx it works the trigger is created successfully but it has no effect. here it is: delimiter // create trigger testref before insert on bookmarks for each row begin declare dummy char(2); if new.title like '%xxx%' then set new.id='xxx'; end if; end; //create

Re: need help on before insert trigger

2006-10-07 Thread Patrick Aljord
On 10/7/06, Patrick Aljord [EMAIL PROTECTED] wrote: thanx it works the trigger is created successfully but it has no effect. here it is: delimiter // create trigger testref before insert on bookmarks for each row begin if new.title like '%xxx%' then set new.id='xxx';

key_buffer_size - need help

2006-09-27 Thread Ratheesh K J
Hlo, We have all our tables as Innodb type. As I understand the variable key_buffer_size is used only for MyISAM tables. Currently we have this var set to 256M on a 4GB RAM machine. Only the Temporary tables created using (CREATE TEMPORARY TABLE) will be of MyISAM type. And there are a lot of

Re: Adding index -- Need help

2006-08-10 Thread Carlos Proal
Remember that if you dont use an index on a colum and you search by that criteria, there would be a whole table scan :(. Its recommended that you always index those columns that appear on a search and/or an order (where column_a='yyy' order by column_b) and those involved on joins; generally

Adding index -- Need help

2006-08-09 Thread Ratheesh K J
Hello All, Need a suggestion for this: We have tables which have very few number of rows ( less than 600 ). For a long period of time the number of rows are going to remain almost the same. 1) Is it better to index the columns of such tables? 2) There are Joins on this table and then a

Need help on EXPLAIN in rating queries

2006-08-01 Thread Ratheesh K J
Helo all, I need explanation on EXPLAIN here. I am trying to JOIN 2 tables TBL1 and TBL2 on TBL1.fld_id = TBL2.fld_id . And finally I filter out the results that i need in the where clause using where TBL1.fld_col = 100; Running an EXPLAIN shows that it is an impossible where condition. This

Re: Need help on EXPLAIN in rating queries

2006-08-01 Thread Aleksandar Bradaric
Hi, I am trying to JOIN 2 tables TBL1 and TBL2 on TBL1.fld_id = TBL2.fld_id . And finally I filter out the results that i need in the where clause using where TBL1.fld_col = 100; Running an EXPLAIN shows that it is an impossible where condition. This may be because there may be no rows

Need help on mysql crashing.

2006-07-27 Thread myssr
Hi, My mysql is crashing. Below table has the values it logs in the .err file before restarting. I am using the large.cnf file. The parameters I have changed are below. Rest are default values. #for performance SSR log=/var/log/mysql-queries.log join_buffer_size=1M max_connections=300

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