COMPGROUPS.NET | Post Question | About | Groups | Contact | Register | Login



comp soft-sys matlab (18489)

comp os linux advocacy (5155)

comp soft-sys sas (3803)

comp soft-sys math mathematica (2916)

comp lang python (2903)

comp lang ruby (2550)

comp text tex (1729)

comp sys mac advocacy (1658)

comp lang c++ (1415)

comp lang javascript (1219)

comp lang c (1196)

comp lang perl misc (1191)

comp lang java programmer (925)

comp dsp (908)

comp sys mac system (890)

comp lang tcl (872)

comp databases ms-access (760)

comp arch fpga (749)

comp lang idl-pvwave (726)

comp software shareware announce (702)

comp lang php (697)

comp lang lisp (682)

comp sys sun announce (659)

comp arch embedded (626)

comp sys mac apps (609)

comp sys ibm ps2 hardware (545)

comp lang c++ moderated (524)

comp lang fortran (524)

comp unix shell (521)

comp os plan9 (514)

comp os linux misc (513)

comp unix solaris (500)

comp databases oracle server (494)

comp sys ibm pc games war-historical (485)

comp lang python announce (483)

comp os ms-windows programmer win32 (476)

comp databases mysql (412)

comp sys cbm (408)

comp dcom sys cisco (407)

comp arch (306)

comp sys ibm pc games action (301)

comp databases informix (274)

comp lang clipper visual-objects (267)

comp os vms (263)

comp lang perl announce (238)

comp lang xharbour (229)

comp graphics apps gnuplot (224)

comp realtime (216)

comp soft-sys ace (215)

comp lang ada (213)

comp protocols nfs (207)

comp protocols snmp (204)

comp parallel (202)

comp sys acorn announce (196)

comp protocols tcp-ip domains (193)

comp sys ibm pc hardware systems (191)

comp unix internals (187)

comp infosystems www browsers misc (184)

comp misc (182)

comp publish cdrom software (182)

comp dcom cabling (174)

comp mail mime (169)

comp std announce (169)

comp ai fuzzy (168)

comp ai edu (166)

comp soft-sys stat spss (156)

comp protocols kerberos (155)

comp databases filemaker (155)

comp sys apple2 (153)

comp admin policy (151)

comp databases postgresql committers (150)

comp databases ibm-db2 (149)

comp databases ms-sqlserver (131)

comp protocols dicom (129)

comp unix programmer (128)

comp security misc (123)

comp unix bsd freebsd misc (120)

comp graphics visualization (117)

comp cad cadence (117)

comp databases olap (116)

comp apps spreadsheets (114)

comp databases postgresql general (114)

comp lang vhdl (113)

comp lang java help (113)

comp ai neural-nets (112)

comp ai (111)

comp ai games (110)

comp dcom telecom (109)

comp client-server (108)

comp os linux announce (105)

comp cad microstation (105)

comp databases oracle marketplace (105)

comp soft-sys math scilab (102)

comp databases progress (102)

comp os linux networking (101)

comp database oracle (100)

comp graphics api opengl (99)

comp ai genetic (98)

comp protocols dns bind (97)

comp compilers (97)


comp.databases.mysql Post New
Items(403) /9 Next >> Last >|
Subject Posted Replies From
Mysql corrupting characters

I am trying to retrieve text from the my mysql database using ajax code witten in php. Somewhere its getting twisted. All the text is retrieved and displayed correctly except the Swedish characters used in some of the words that are stored in my mysql phpmyadmin database. These are displayed seriously incorrectly. Each character deletes the following 2 characters. S=E5 "p=E5skvecka" becmes p*vecka where * is an upright diamond with a question mark in it. This offending character can not be copied into this newsgroup posting, it just wont take it. Everything else on the page is cor

9/5/2010 4:51:02 PM 2 GarryJones <mor...@algonet.se>
Lifetime of user variables

Since you cannot refer to user variables within the SELECT statement of a view's definition, a helpful user contributed the advice to wrap a user variable in a function which can be used to define a view: http://dev.mysql.com/doc/refman/5.0/en/create-view.html (You have to scroll down to the bottom of the page to the first user contribution in order to see it). Since multiple queries are not allowed in a single SQL statement or call to mysql_query() in PHP, you have to send them off one at a time. So I have PHP statements like this (error handling "or die..." clauses omi

9/4/2010 3:18:26 PM 2 Robert Hairgrove <rhairgr...@bigfoot.com>
Select Query Help

I'm struggling - with my limited knowledge of SQL - to write a query that does what I want it to, and I was hoping that someone here may be able to help out. I have a table with two columns, user1 and user2, which store user ID's. For example: user1 | user2 ----------------------------- 1 | 4 1 | 2 1 | 3 3 | 2 3 | 1 5 | 1 What I want to do is select all the rows for which, say, user2 is 1, but where user1 is such that there isn't a reverse combination. So above, the only row that should come back is 5/1 as for the row 3/1 there is also a row 1/3. I know tha

9/1/2010 4:30:58 PM 5 James Baker <james.d.ba...@gmail.com>
how to create a db model about records/disc/sides/tracks of one artist

I've created a db model that represents a collection of one artist albums/records/cd/ep/lp/dvd/. The basics are as following: 1 record contains 1 or multiple discs (i.e: one record can contain 2 cd's + 1 dvd) 1 disc contains 1 or multiple tracks and 1 track could be in more then 1 disc In the case of a CD or DVD, they contain one side with tracks. In the case on an EP or LP, the disc contains 2 sides (usually side a, side b) each side could contain tracks... By default a cd and dvd always contain one side with tracks. An EP, LP always contain 2 sides with tracks and someti

9/1/2010 2:25:38 AM 2 SM <servandomont...@gmail.com>
Best way to export one Excel column for import into MySQL?

I have an Excel (2007) workbook with 5 worksheets. Each sheet has a list of word in column A. The other columns vary from sheet to sheet. What's the best way to export these 5 columns so they can be imported into MySQL?

8/30/2010 11:11:49 PM 4 Prof Wonmug <won...@moo.gov>
IP-addr to Country: JOIN question

Hi folks. I've become a little stuck trying to work out how to JOIN two tables in what is maybe a rather unconventional way... For the following, assume all IP addresses are represented as integers, e.g. '127.0.0.1' would be 2130706433. Let's say I have a table called 'addresses' containing an IP address column, 'ip', for which I'd like to establish the country code. I also have a 'countries' table containing IP address ranges and their associated country codes; columns: 'ip_from', 'ip_to', 'code', an example entry from which might look like: 16777216, 17367039, AUS As

8/30/2010 10:21:14 AM 2 "Andrew C." <nonse...@totally.made.up>
ROWS INTO COLUMN HEADERS...

Hi all, I could group on id and year wise to get the below table. id year num amount | 01525 | 2007-2008 | 141 |1039962.00 | | 01525 | 2008-2009 | 74 | 352810.00 | | 01525 | 2009-2010 | 63 | 548181.00 | | 01988 | 2007-2008 | 140 |1301708.00 | | 01988 | 2008-2009 | 51 | 438070.00 | | 01988 | 2009-2010 | 57 | 304886.00 | I want the same in the following format. Please help me! 2007-2008 2008-2009 2009-2010 id num amount num amount num amount 01525

8/28/2010 3:02:07 AM 1 nag <visit...@gmail.com>
left pad a column

I uploaded a csv file to mytable. The sku column had some boxes on the end of the column in MySQL Workbench. I did the following update to mytable to left pad it with zeros. Maybe I should have removed the the boxes first? I don't think it worked. UPDATE onelink SET sku= lpad(sku,5,'0') WHERE sku='sku'. The sku column is a char(5) How do I remove the boxes on the end, which is probably a non- printable character from excel? I could do a str replace but what are you searching for? tnx, Here are some of the sku records, the x is where the box is. One record even has

8/27/2010 1:59:54 AM 5 jr <jlro...@yahoo.com>
load data infile query doesn't work because data files were moved

I load this file every day, using mysql query browser with this LOAD infile query : LOAD DATA INFILE '08262010 item_extraction.txt' INTO TABLE myTable IGNORE 1 LINES; Then the server was out of space so an admin moved the data tables to the F drive: F:\Folder SQL\data\cart_order This is the path on the F drive. Now my load data infile script doesn't work anymore. I moved the upload file to the F: drive folder. I'm getting weird error messages like: The query could not be executed. Table 'bugracker.myTable' doesn't exist. Is it the space in the file path?:

8/27/2010 12:00:47 AM 0 jr <jlro...@yahoo.com>
load data infile query doesn't work because data files were moved

I load this file every day, using mysql query browser with this LOAD infile query : LOAD DATA INFILE '08262010 item_extraction.txt' INTO TABLE myTable IGNORE 1 LINES; Then the server ran out of space so an admin moved the database files to the F drive: F:\Folder SQL\data\cart_order This is the path on the F drive it does have a space in the path. Now my LOAD DATA INFILE script doesn't work anymore. I moved the text file to the F: drive folder cart_order. I'm getting weird error messages like: The query could not be executed. Table 'bugracker.myTable' doesn't exist. Is it the sp

8/27/2010 12:18:01 AM 0 jr <jlro...@yahoo.com>
How to query to get records of 3 consecutive months of data in the last 6 months

Hi, I am trying to find all rows that has 3 consecutive months of data in the last 6 months. Assume there is a month column. I can get data for the last 6 months. but within this 6 months I need all records that has any 3 consecutive months of data. Any help is appreciated. Thanks.

8/26/2010 4:58:25 AM 3 Priya Kothari <priyakothar...@gmail.com>
Query to find all rows that has 3 consecutive months of data in the last 6 months

Hi, I am trying to find all rows that has 3 consecutive months of data in the last 6 months. Assume there is a month column. I can get data for the last 6 months. but within this 6 months I need all records that has any 3 consecutive months of data. Any help is appreciated. Thanks.

8/26/2010 5:08:58 AM 0 Priya Kothari <priyakothar...@gmail.com>
Self-join query or else... need advice

Hello I'm not sure how to do the following in a query, i believe, maybe, a self-join query, but i have no idea how to I have a table (album) that contains albums: albumid, albumname, ... ------------------ 1, 'Forever' 2, 'The Last Song' 3, 'Maybe' 4, 'This is not' 5, 'Hello' 6, 'Goodbye' I have another table (single) that repreents the singles that have been released for a specific album: albumid, singleid --------------- 1, 3 1, 5 1, 2 4, 3 The singleid is, basically, the albumid that is in the table album. I want to be able to pick all the singles from an albu

8/25/2010 4:17:53 PM 6 SM <servandomont...@gmail.com>
error 1452

Hello I have these three tables: users: id, username, PRIMARY KEY (`id`) blog: id, user_id, content, PRIMARY KEY (id), FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE blog_comments: id, blog_id, user_id,content, PRIMARY KEY (id), FOREIGN KEY (blog_id) REFERENCES blog(id) ON DELETE CASCADE Does this seem to be ok? I hope so. At the other hand, there is a separate database containing users, blogs and blog comments. The relevant fields are more or less the same. When I migrate the user, no problem occurs: insert into users (id,username) (select use

8/25/2010 12:20:11 PM 1 pac Man <querystra...@gmail.com>
compare and join three tables....

Hi, I have three tables of sales for year 2007-08, 2008-09, 2009-10 like follwing. I need a short query to join all the tables on dist.code grouped. 2007-08 dist.code number amount 1234 5 100.00 1234 6 200.00 3456 3 400.00 3456 8 200.00 2008-09 dist.code number amount 1234 15 200.00 1234 16 300.00 3456 32 500.00 3456 68 300.00 2009-10 dist.code number amount 1234

8/25/2010 5:43:35 AM 0 nag <visit...@gmail.com>
mysql server restart

I am unable to restart mysql server. I was install mysql , That time mysqld is located on /etc/init.d/ folder location. after some days the server was crashed and I did not find out mysqld in /etc/init.d/ folder. After that I re install mysql. I can connect mysql and every thing is working fine. But I am unable to restate mysql server When I execute "/etc/init.d/mysql restart" I am getting "mysqld file is not exit in /etc/init.d/" I was copyed mysqld file from other server after I execute the above commnad I am getting the following error "Mysql manager or server PID not fi

8/23/2010 1:31:09 PM 0 sudheer <g.sudheer2...@gmail.com>
start and end range from multiple entries

Hi, I would like to know if there is a good way of creating ranges from start and end rows. Like this: "select start, end, cluster from table" returns: 1 48 340857 1 50 340857 1 54 340857 5 62 340857 34 107 340857 34 107 340857 53 107 340857 121 194 340857 141 215 340857 169 219 340857 and I would like to create the ranges from those entries, lile: 1-107 121-219 Thanks in advance, Cheers, Albert.

8/22/2010 4:39:21 PM 9 avilella <avile...@gmail.com>
changing mysql root password

Hi I am working you RHEL4.4AS and new to mysql. i am getting mysql prompt just by typing mysql at hash prompt. i.e., #mysql mysql> I tried to enter into mysql server with the following command. #mysql -u root -p and gave the system root password, but it did not accept it. I tried to change the password in mysql prompt after entering into mysql as step 1 above mysql>UPDATE root SET PASSWORD = PASSWORD("newpassword"); but it did not change. Kindly help me.

8/22/2010 2:01:00 AM 0 nag <visit...@gmail.com>
Alter table not working under win7 wamp5

For this discussion, foob is my database parts is my database. I tried this as both the user who has full priviledges on foob and also as the superuser and got errors both times. The command I tried to execute and the associated error message are: mysql> ALTER TABLE `foob.parts' ADD `avail_intl_flag' char(1) not null set default (`Y'); ERROR 1103 (42000): Incorrect table name 'hawke.articles' ADD ' mysql> I am running WAMP5 1.7.3. I am running this software on a Win7 32 bit version machine. I am running command line MySQL under a DOS window with only the MySQL s

8/21/2010 5:19:50 PM 5 Dan Konecny <kone...@ptd.net>
case sensitive in REGEXP

I have SELECT * FROM industry WHERE description REGEXP BINARY ' O' This should select any space plus capital O but it selects both lower and upper case O. How can I make it case sensitive? Regards John

8/21/2010 10:47:55 AM 0 "John" <john1...@yahoo.com>
Possible to add "ON DELETE CASCADE" after the fact?

Hi, I'm using MySQL 5.0 with InnoDB tables. I have a foreign key constraint set up, but I would like to expand the foreign key constraint to add the "ON DELETE CASCADE" clause to it. Do I have to drop and create the foreign key or is there a way I can modify it? Thanks for your help, - Dave

8/18/2010 3:17:41 AM 4 laredotornado <laredotorn...@zipmail.com>
InnoDB background activity

I''ve noticed that when I do about 5000 inserts in a single InnoDB transaction, it works fine, and when I commit the transaction, the commit returns quickly. That all works fine. Then, for about the next minute, mysqld is using CPU time and doing disk accesses before it goes idle. This takes longer than the inserts did. What's it doing? Is the data safe on disk when the commit returns, or is the actual work done after the commit? John Nagle

8/14/2010 4:41:29 PM 1 John Nagle <na...@animats.com>
update with subquery

Hi guys I have these three tables: table1: id subcategory head_category headcategory: id name subcategory: id name head-category insert into headcategory values(1, 'songs'); insert into headcategory values(2, 'movies'); insert into subcategory values(1, 'bad romance', 1); insert into subcategory values(2, 'stan', 1); insert into subcategory values(3, 'godfather', 2); At the beginning the table table1 didnt contain the field head_category. I added this field after a huge import of data, so all of them are set to NULL (Yes, I realized that head_category was a

8/13/2010 2:53:53 PM 3 wonderpix <wonder...@gmail.com>
select rows with same id and different description

Hello, I have a simple table with id and description, with 40000 rows. Id is not a primary key. I need to extract all rows with the same id but different description. How may I do? Thank you -- elimina unsampdoriano per rispondere via email

8/12/2010 9:22:55 AM 7 Generale Cluster <alexunsampdori...@unsampdorianosoftmasters.net>
Errcode: 28 (out of space, apparently)

I've a client application which has experienced this error. Fixing it required expanding the available tmp space. Unfortunately, the client application is not one we've authored or one over which we've any control. And it doesn't seem to do a good job of error reporting in most case. But this error is one detected by the MySQL server, no? Yet nothing was logged by the server that experienced this error. Am I wrong about this being a server-side issue? Or, is there some way to get the server to log events like this so as to make them easier to detect? I've started

8/11/2010 11:12:35 PM 0 Andrew Gideon <c182driv...@gideon.org>
Check record reference by other tables

Hello all, Suppose I have 2 tables order and product. In order table it have a field named product_id which refers to primary key ID of product table. e load Now someone wants to change details in product table such as the price but this action will affect the old data in order table as it takes product information such as name, part number and price from product table. So I want to ask whether there exists commands in Mysql that can alert me when the product ID is referenced by other table. One method is split the relation, just copy the price, part number and description

8/10/2010 9:32:32 AM 9 cell <cellte...@gmail.com>
Cant get "grant execute on procedure" to work.

ERROR 1370 (42000): execute command denied to user 'wwwrun'@'%' for routine 'GasCheck.CreateTid' To get here I've got the following setup on ubuntu 10.04 using mysql 5.1.41-3ubuntu12.6 : mysql> select user(), current_user(); +------------------+----------------+ | user() | current_user() | +------------------+----------------+ | wwwrun@localhost | wwwrun@% | +------------------+----------------+ select * from mysql.procs_priv; +------+----------+--------+--------------+-------------- +-----------------+-----------+---------------------+ | Host | Db |

8/9/2010 4:25:47 PM 0 sybaseguru <pe...@glossop.org>
Business Intelligence extends Real Estate Reporting

Property agents get direct access to realestate.com.au data. Australian business intelligence vendor Yellowfin has partnered with Real Estate Australia to provide over 9000 real estate agents access to click-stream data from advertising served on the realestate.com.au site. The deal, made for an undisclosed sum, will enable Real Estate Australia [REA] to give its customers - real estate agents - access to data it tracks on potential real estate buyers browsing its realestate.com.au site. Glen Rabie, chief executive of Yellowfin told iTnews that the "primary buyer of REA's servi

8/8/2010 11:21:27 AM 0 JTP PR <janinepellet...@yahoo.ca>
concatenate data from multiple fields into one

From what I have been reading it is possible to copy data from one field into another by doing something similar to this: UPDATE table SET field2 = field1; what I am looking to do is take the the information from several fields and create one new field ie: all of the info from field1 + first character of field2 + first character of field3 + first charcter of field4 is used to create the information in field5 for this I could do something like: UPDATE table SET field5 = CONCAT(field1, ',' ,field2, ',' ,field3, ',' ,field4); but how do i get it to only use the first characte

8/5/2010 5:18:06 PM 0 canajien <canaj...@gmail.com>
[Jobs] Versatile Software Developer needed in Los Angeles area...

Skills Needed: SQL language knowledge: SELECT, JOINS, TRIGGERS, STORED PROCEDURES, FUNCTIONS. Can figure out how to do the above in our 3 database engines: (PostGre, MySQL, MS SQL) Front-end knowledge: JavaScript, CSS, HTML Any web language that is object oriented knowledge: PHP, Ruby, Pearl, Java, etc. All future developments will be in Ruby on Rails. This is a full-time position for an exciting company. Gary.

8/6/2010 12:15:20 AM 0 LaughingNinja <glacker...@wetdesign.com>
INSERT INTO one field doesn't get input

I am not getting the username input into this database, only the ip address it is inserting a blank? I echoed the values from the post and I get both ip and uname values. What can I look for? /They are both text fields. One gets input and the other doesn't. The form looks okay, thanks, if ($_POST['submit']){updatePrinter($ip,$uname) ;}//call insert function function updatePrinter($ip,$uname){ $link = mysql_connect("XXX.XXX.XXX.XXX","usr","pwd"); mysql_select_db("cart_order",$link); $sql="INSERT INTO `cart_order`.printer (ip,uname) "; $sql.="VALUES('$ip','$uname') "; $result

8/4/2010 6:27:25 AM 2 jr <jlro...@yahoo.com>
'MySQL server has gone away' after three weeks

I had a long-running batch job on a dedicated server that had been running for three weeks. It's written in Python, and failed with FAILED: OperationalError(2006, 'MySQL server has gone away') while doing a LOAD DATA INFILE. The MySQL server is local. It hadn't failed, and remained up. There was no "KILL" executed; the server shows zero KILL operations since startup. The LOAD DATA INFILE succeeded on retry, so nothing was wrong there. But the server was heavily loaded at the time. The job doing the load was running at a low priority, so it could have been sque

8/4/2010 11:37:32 PM 0 John Nagle <na...@animats.com>
Ideas to improve DB design

I have the current tables: CREATE TABLE joint ( joint_id int(10) unsigned NOT NULL auto_increment, joint_name varchar(50) NOT NULL, PRIMARY KEY (joint_id) ) ENGINE=InnoDB; CREATE TABLE company ( company_id int(10) unsigned NOT NULL auto_increment, company_name varchar(50) NOT NULL, joint_id int(10) unsigned default NULL, direct_company_id int(10) unsigned default NULL, matrix_company_id int(10) unsigned default NULL, PRIMARY KEY (company_id), CONSTRAINT company_fk1 FOREIGN KEY (joint_id) REFERENCES joint (joint_id), CONSTRAINT company_fk2 FOREIGN KEY (direct_comp

7/23/2010 10:46:05 AM 0 =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= <alvaro.NOSPAMTH...@demogracia.com.invalid>
Count grouped by time interval?

Hi All, I have data like this as part of a hit counter: vID entrytime 3 2010-07-22 02:55:25 3 2010-07-22 02:55:28 4 2010-07-22 02:57:27 4 2010-07-22 02:59:04 4 2010-07-22 03:06:33 3 2010-07-22 03:06:37 5 2010-07-22 03:06:43 2 2010-07-22 13:28:19 7 2010-07-22 13:28:23 4 2010-07-23 03:08:55 4 2010-07-23 03:10:53 I need to create a mySQL query that counts "visits" so that hits within an hour of any other hit by the same visitor are not counted. (for example the first batch of 4s above should be counted as 1 visit as should the second batch of 4s). Is this possible? Is ther

7/23/2010 12:50:41 PM 0 Ciaran <cronok...@hotmail.com>
Selecting from MySql an Oracle data source

Hello, I would like to select while in a MySql database a table in an Oracle data source. For example, I have a the latest version of MySql 5.x and want to select from a 9i Oracle database. what can I do here. Is there a MySql Solution or FREE add-on, not a 3rd Party solution? Ideally it would be something like or analogous to an Oracle Database Link where I setup the database link to talk to a schema in Oracle and all I need to do is select using the link. Thanks Much! Devdewboy

7/23/2010 5:32:44 PM 0 devdewboy <devdew...@hotmail.com>
Problem with 'Reset Master'

Hi, I'm hoping someone can help me with this as I can't seem to find a solution from searching the web. We are running mysql 5.1 on linux. We have 2 servers setup in a master/slave configuration. The host name of the master was oi-prod-db02. The host name of the slave is oi-prod-db04. Our master server crashed and could not be brought back. After confirming that the slave had executed all the sql for the bin logs that it had, I promoted the slave to become a master: I stopped the slave thread and then issued a 'reset master'. 'show master status;' correctly showed the l

7/23/2010 8:59:55 PM 0 Gavin <gavin.d...@gmail.com>
C access: accessing ints

Hi All, I have written my first program to access a database from C. However, my manual, "MySQL" by Paul DeBois, only explains how to access varchars and blobs, it doesn't explain how to access, say ints or floats or doubles. My code looks like this (mostly copied straight out of the book): .... if (mysql_query(conn, "select BowlerFirstName, BowlerLastName, BowlerCity" " from Bowlers")) { u_reportError(conn, "mysql_query() failed"); } res_set = mysql_store_result(conn); if (!res_set) { u_reportError(conn, "mysql_store_result()

7/25/2010 1:25:33 PM 0 lalawawa <use...@ccjj.info>
updating one table with a count from another

I have a table 'map', with one record for each of a set of maps. I have another table 'image' with one record for each of a set of images. A field in 'image' tells me which map each image is of. I have created a new field in 'map', which I want to contain the number of images (0, 1, 2, etc.) that are of that map. I tried to set it up like this: UPDATE map SET noi = 0; UPDATE map, image SET map.noi = map.noi + 1 WHERE map.id = image.id; which works, except that if there is more than 1 image, it only has the value 1. How can I achieve what I want? Nick -- Nick W

7/27/2010 2:43:51 PM 0 Nick Wedd <n...@maproom.co.uk>
Newbie: "error in your SQL syntax"

Can anyone help me, going nuts with this error which defies logic (the stuff I thought computing was based on'. My full sql statement is $sql = "UPDATE tblNames SET (lastname='$lastname',firstname='$firstname',title='$title',country='$country', isfemale=$tf,nationality='$nationality',tels='$tels',email='$email',DNI='$DNI',usernotes='$usernotes', employment='$employment',address='$address',zip='$zip',DOB='$DOB',username='$username',adminnotes='$adminnotes', modified=NOW(),ULX=$UULX) WHERE ID=".$selid; and I get a "You have an error in your SQL syntax; check the manual that corres

7/27/2010 10:43:14 PM 0 Ken Ashton <kash...@terra.es>
Yet another way of representing trees in mysql

I've written a few notes on an implementation of a tree in mysql: http://www.dustbite.se/tree/ I've used the same set of data as: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html. and discuss how the queries from this article can be constructed in this model. Feedback, anyone? /Lennart

7/28/2010 1:11:14 PM 8 Lennart Jonsson <erik.lennart.jons...@gmail.com>
select one field and related ones

Hi people: id, name colors: id, color, person insert into people (1, 'Mark'); insert into colors (1, 'red', 1); insert into colors (2, 'blue', 1); This means that Mark likes the colors red and blue. Actually, its much more than this, but to simpify I just took the two relevant tables. Im going to select fields from a couple of tables where there is mark's id. Among the tables there is the "people"-table. So long no problems. But now, for each of the fetched row I need to retrieve the colors that Mark likes. I would like to avoid looping through each row and select

7/28/2010 2:06:52 PM 0 pac Man <querystra...@gmail.com>
Concerns of an application developer

Caution: this is not strictly MySQL related. Not at all, actually. It's about normalization and how an organization sees it. Please, ignore this thread if you aren't interested. --- Now, here's what happened today. In this small company, a webbased application with MySql database is used to keep track of sales. Salesmen enter their data once a week online, and reports are generated at various levels. Such levels are: company, team and personal level. A team consists of a group of sales persons, with a sales manager in charge of the team. There are about 10 teams. Reports fo

7/29/2010 11:11:49 AM 0 "Erick T. Barkhuis" <erick.use-...@ardane.c.o.m>
help with sql statement please...

I have a table: +---------------------------------------------+ | ImageID | ImageType | ImageSize | | a | bmp | 100 | | b | jpg | 25 | | c | bmp | 100 | | d | bmp | 50 | +---------------------------------------------+ I need to get back a list like: bmp 100 50 jpg 25 select unique ImageType, ImageSize Is that correct sql?

7/29/2010 8:54:38 PM 0 SpreadTooThin <bjobrie...@gmail.com>
MySQL DB Server Backup

Does anyone know a good tool to backup the DB to Amazon S3? Thanks,

7/30/2010 3:29:00 PM 0 Ennio <enniobozze...@gmail.com>
MySQL JDBC replication driver not using all slaves

We have a setup with 1 master and 3 slaves. The JDBC connection string is jdbc:mysql:replication://master,slave1,slave2,slave3/idbname? zeroDateTimeBehavior=convertToNull&amp;autoReconnect=true&amp;roundRobinLoadBalance=true However, the traffic only goes to master for writes and slave1 for reads. Slave 2 and 3 just sit there. Is there something obvious I am missing? I looked around but could not find any solution to this problem. Using mysql-connector-java 5.1.10. Thanks for your help! -cheers, Manish

7/31/2010 7:50:13 AM 0 Manish Pandit <pandit.man...@gmail.com>
SQL Injection Single Quote

I have read that to combat the SQL Injection single quote method one should replace a single quote with two single quotes. My question is why not replace the single quote with a SPACE character? TIA

8/1/2010 4:51:27 PM 0 Yadda <ya...@nospam.net>
comparing rows in same table

Hi there, Quick question. I have a product stock/price history table, what kind of query can i execute to show products that have a price change? Table has productid, stock, price, and createddate columns. Dataset example: | PID | Stock | Price | CreatedDate | | 1 | 755 | 15.50 | 2010-07-22 18:31:12 | | 1 | 755 | 15.50 | 2010-07-21 15:19:52 | | 1 | 755 | 15.50 | 2010-07-20 23:35:23 | | 1 | 797 | 14.50 | 2010-07-19 23:35:18 | | 2 | 1000 | 14.50 | 2010-07-22 18:31:13 | | 2 | 1000 | 14.50 | 2010-07-21 15:19:52 | | 2 | 1000 | 14.50 | 2010-07-20 23:35:24 | | 2 | 1000 |

7/22/2010 11:59:52 AM 0 Rich <richard.de...@gmail.com>
Unkown MySQL process

I have a process that's sucking up all the CPU cycles. It is not something I started, and this started happening recently. The server has a number of domain hosted on it, and they are all WordPress installations. The MySQL part, is that MySQL seems to be the owner at priority 0 and the command line is: /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql -- pid-file=/var/lib/mysql/parnas.webuilders.com.pid --skip-external- locking --socket=/var/lib/mysql/mysql.sock If I kill, it restarts immediately. Anyone with any ideas of what this might be? I tried googling it, b

7/21/2010 12:46:50 AM 0 EastSideDev <eastside...@gmail.com>
SQL Searching in 2 Tables

Hello, i have the following SQL Problem with MySQL: I have 3 Tables, one with adresses, one with items and another with the relations what AdressID has bought what ItemID. I want to ask for a list of adresses, that didn't buy any item so far. How should the SQL-query look like for that? Thanks for any help, Martin Nadoll

7/20/2010 9:49:54 AM 0 Martin Nadoll <nad...@arcor.de>
Initialising a new column with random values?

Hi, I am trying to add a new column to a table and I would like to initialise them all to different random values. My first attempt was this: ALTER TABLE Users ADD COLUMN `Pin` CHAR(4) NOT NULL DEFAULT CONCAT(ROUND(RAND()*9),ROUND(RAND()*9),ROUND(RAND()*9),ROUND(RAND()*9)); But that triggers a syntax error, presumably the ALTER TABLE statement can only accept a constant as a default value? Ideally I would like to create and populate these fields in a single release script... Is this possible? If not how would you recommend it should be done? Thanks

7/20/2010 9:16:49 AM 17 Mark Smith <marksmith5...@jungle-monkey.com>

Pages: 2 3 4 5 6 7 8 9









Newest Articles

How do I insert the coordinates (centroid) of detected moving objects onto the object?
10 min. 17 sec. ago

Hardup Quark on Who Wants To Be A Millionaire
11 min. 40 sec. ago

Randsample (leave-one-out)
21 min. 18 sec. ago

48 core servers???
25 min. 51 sec. ago

understanding needspace
27 min. 27 sec. ago