Foreign Key Error

2011-02-14 Thread Victor Subervi
|| | Category | varchar(40) | YES | | NULL|| | Parent | varchar(40) | YES | | NULL|| +--+-+--+-+-++ 4 rows in set (0.00 sec) Please advise. TIA, Victor

Re: Foreign Key Error

2011-02-14 Thread Victor Subervi
: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Monday, February 14, 2011 3:09 PM To: mysql@lists.mysql.com Subject: Foreign Key Error Hi; I have this command: create table if not exists categoriesRelationships (ID integer auto_increment primary key, Store varchar(60), Parent integer

Too Strange for Words

2010-09-18 Thread Victor Subervi
/a | ++---+-+--+--++---++--+--+---+ 4 rows in set (0.00 sec) mysql select p.weight from Passengers p; ++ | weight | ++ | NULL | | NULL | | NULL | |155 | ++ 4 rows in set (0.00 sec) TIA, Victor

Complex Select Query

2010-08-24 Thread Victor Subervi
such that after stacking the data for all results for a certain category, that the next results to be stacked should be those whose parent = the former category, then move on to the next category, etc. How do I do this? TIA, Victor

Re: Complex Select Query

2010-08-24 Thread Victor Subervi
thought I'd make my presentation of data a little cleaner but frankly it ain't worth going through all that learning and experimentation to do it. If there isn't another way I'll just forget about it. Any other suggestions would be nice. TIA. Victor - -Original Message- From

Join Problem

2010-08-16 Thread Victor Subervi
is to exclude results in which in_service !=1; however, the filter isn't working. Please advise. TIA, Victor

Why Does This Drop Fail?

2010-07-22 Thread Victor Subervi
|| +---+--+--+-+++ 13 rows in set (0.00 sec) How drop it? TIA, Victor

Re: Why Does This Drop Fail?

2010-07-22 Thread Victor Subervi
on Store. How? TIA, V Regards John Daisley Microsoft SQL Server 2005/2008 Database Administrator Certified MySQL 5 Database Administrator Certified MySQL 5 Developer Cognos BI Developer Telephone: +44 (0)7918 621621 Email: john.dais...@butterflysystems.co.uk On 22 July 2010 14:02, Victor

Re: Why Does This Drop Fail?

2010-07-22 Thread Victor Subervi
On Thu, Jul 22, 2010 at 9:09 AM, John Daisley daisleyj...@googlemail.comwrote: Sorry, my bad! Must learn to read the whole message!! This can be caused because when a foreign key is created mysql adds an index key to the column in addition to the foreign key. Why I'm not sure, but I'm

Creating a Data Dictionary

2010-07-12 Thread Victor Subervi
utilize data like that. Of course, I could lump the whole key-value pairs into one data and create an enum like that, then parse them later. I'm just wondering if there's a more elegant way to do this. TIA, Victor

Two Primary Keys

2010-06-29 Thread Victor Subervi
fields. How do? TIA, Victor

Re: Two Primary Keys

2010-06-29 Thread Victor Subervi
2010/6/29 João Cândido de Souza Neto j...@consultorweb.cnt.br As far as I know, if you have an auto_increment primary key, you cant have any other field in its primary key. Makes sense. Actually, I was just copying what someone else gave me and adding the auto_increment, then I got to

Re: Two Primary Keys

2010-06-29 Thread Victor Subervi
2010/6/29 João Cândido de Souza Neto j...@consultorweb.cnt.br I think the best, or may be the right way is to use picture_id as primary key and a unique index to product_sku. Yes, sounds good. So the purpose, then, is to speed lookups on fields commonly accessed. I'd forgotten that. Thanks, V

Foreign Key Problem

2010-06-22 Thread Victor Subervi
) | NO | | NULL|| +-+-+--+-+-++ 5 rows in set (0.00 sec) Please advise how to alter Flights to take the foreign key. TIA, Victor

Re: Foreign Key Problem

2010-06-22 Thread Victor Subervi
Problem solved. I tried everything that *should* have worked and didn't. Then I just wiped the test database and started with everything *fixed* (all engine=innodb, all keys of same type, etc.) and it all worked. V

Re: Foreign Key Problem

2010-06-22 Thread Victor Subervi
On Tue, Jun 22, 2010 at 11:53 AM, jayabharath jbhara...@gmail.com wrote: Hi Victor, The actual problem is with the key field. Flights.pilot_id is set to INT NOT NULL and you had specified Pilots.id to INT NULL. You have to change both the columns to NULL or else NOT NULL to avoid

Re: Foreign Key Problem

2010-05-22 Thread Victor Subervi
This is just for the sake of future googlers of this thread. The correct mysql command is: ursor.execute('create table if not exists Passengers (id int(11) auto_increment primary key, flights_id int(11) not null, customer_id int(11) not null, foreign key (flights_id) references Flights (id),

Another Foreign Key Problem

2010-05-21 Thread Victor Subervi
`) REFERENCES `Customers` (`id`))') However, when I try from the MySQL prompt after duly printing it out from the code, it works. Why? TIA, Victor

Re: Another Foreign Key Problem

2010-05-21 Thread Victor Subervi
I'm canceling this thread. It belongs in the Python list. Sorry! V On Fri, May 21, 2010 at 1:24 PM, Victor Subervi victorsube...@gmail.comwrote: Hi; When I try to execute this code from my Python script, I get this error: Traceback (most recent call last): File /var/www/html/creative.vi

Re: Foreign Key Problem

2010-05-20 Thread Victor Subervi
On Wed, May 19, 2010 at 12:02 PM, Shawn Green shawn.l.gr...@oracle.comwrote: Victor Subervi wrote: On Wed, May 19, 2010 at 10:59 AM, Shawn Green shawn.l.gr...@oracle.com wrote: Shawn Green wrote: look again closely at your FK definitions. The pattern should be FOREIGN KEY

Re: Foreign Key Problem

2010-05-19 Thread Victor Subervi
On Tue, May 18, 2010 at 2:23 PM, Shawn Green shawn.l.gr...@oracle.comwrote: Shawn Green wrote: I may be confused but how can the ID of the Passengers table be both the ID of the Flight they are taking and their Customer ID at the same time?

Re: Foreign Key Problem

2010-05-19 Thread Victor Subervi
On Wed, May 19, 2010 at 10:59 AM, Shawn Green shawn.l.gr...@oracle.comwrote: Shawn Green wrote: AH! that's your mistake. You think that creating the FK will also create the column. That does not happen. You have to define the table completely before you can associate the columns on this

Foreign Key Problem

2010-05-18 Thread Victor Subervi
| tinyint(3) | YES | | NULL|| ++--+--+-+-++ 3 rows in set (0.01 sec) So, why didn't the foreign key get created? It exists as a primary key in Customers. Please advise. TIA, Victor

Re: Foreign Key Problem

2010-05-18 Thread Victor Subervi
apparently it didn't like my foreign key. Do I need to do something with the table I'm referencing or what? TIA, V On Tue, May 18, 2010 at 3:44 PM, Victor Subervi victorsube...@gmail.comwrote: Hi; mysql create table if not exists Passengers (id int unsigned auto_increment primary key, foreign

Re: Foreign Key Problem

2010-05-18 Thread Victor Subervi
On Tue, May 18, 2010 at 1:09 PM, Shawn Green shawn.l.gr...@oracle.comwrote: Johan De Meersman wrote: For additional details about failed FK attempts, check the error details in the SHOW INNODB STATUS report. I get this: 100518 10:26:22 Error in foreign key constraint of table

Re: tmp tables

2010-01-15 Thread Victor Subervi
On Thu, Jan 14, 2010 at 1:35 AM, Chris W 4rfv...@cox.net wrote: I think the reason the other poster was so harsh is because others have suggested the right way to do it, if not in a lot of detail, and you have just argued with them. I don't recall anyone doing that. I don't recall arguing. I

Re: tmp tables

2010-01-13 Thread Victor Subervi
On Mon, Jan 11, 2010 at 3:21 PM, mos mo...@fastmail.fm wrote: At 09:56 AM 1/11/2010, Johnny Withers wrote: Victor, The temporary table solution is not a good one. Use a single table and store each item put into a cart identified by the session ID of the user. A process should clean out

Re: tmp tables

2010-01-13 Thread Victor Subervi
On Wed, Jan 13, 2010 at 2:33 PM, Johnny Withers joh...@pixelated.netwrote: No one designs a shopping cart system this way. http://www.google.com/search?q=shopping+cart+database+table+design If you are dead set on this crazy design it doesn't matter if you put the temp tables in the main

Re: tmp tables

2010-01-11 Thread Victor Subervi
On Mon, Jan 11, 2010 at 10:35 AM, Baron Schwartz ba...@xaprb.com wrote: Victor, On Sun, Jan 10, 2010 at 1:20 PM, Victor Subervi victorsube...@gmail.com wrote: Hi; I have a shopping cart that will spawn a tmp table for every shopping cart instance. Would it be better to create

Re: tmp tables

2010-01-11 Thread Victor Subervi
On Mon, Jan 11, 2010 at 10:49 AM, Baron Schwartz ba...@xaprb.com wrote: Victor, That strikes me as messy. Each tmp table has as many rows as necessary for the products that are to be bough. To do as you say I would have to create a table with a zillion rows to accommodate however many

Re: tmp tables

2010-01-11 Thread Victor Subervi
On Mon, Jan 11, 2010 at 11:38 AM, Keith Murphy bmur...@paragon-cs.comwrote: Victor, Don't want to butt in, and not trying to be rude, but he gave you advice. You don't seem inclined to take it. How else can he, or anyone else, help you? Clearly you don't understand some fundamental issue

tmp tables

2010-01-10 Thread Victor Subervi
Hi; I have a shopping cart that will spawn a tmp table for every shopping cart instance. Would it be better to create a separate database for these instead of having them in the same database as all the other tables for the shopping cart? TIA, Victor -- The Logos has come to bear http://logos

Re: Another Inserting Multiple Values with Set Problem

2010-01-08 Thread Victor Subervi
On Fri, Jan 8, 2010 at 2:26 AM, Thiyaghu CK theyaho...@gmail.com wrote: Hi Victor, You have given space after the comma(shown here: ('Small, Medium, XSmall')). Take out the space and try, it will work. Example: mysql insert into products(sizes) values ('Small,Medium,small,medium'); Query

Re: Another Inserting Multiple Values with Set Problem

2010-01-08 Thread Victor Subervi
On Fri, Jan 8, 2010 at 9:29 AM, Thiyaghu CK theyaho...@gmail.com wrote: Hi Victor, Take out the double quotes from[ ('Small,Medium,XSmall'), ('teal_E2725B,black_FF,yellow_9ACD32')]. Its working fine for me. mysql insert into products (sizes, colorsShadesNumbersShort) values(('Small

Re: Another Inserting Multiple Values with Set Problem

2010-01-07 Thread Victor Subervi
OK, guys, I'm totally confused: mysql insert into products (SKU, Category, Name, Title, Description, Price, SortFactor, Availability, OutOfStock, Weight, ShipFlatFee, ShipPercentPrice, ShipPercentWeight, sizes, colorsShadesNumbersShort) values (prodSKU1, prodCat1, name1, title1, descr, 12.34,

Another Inserting Multiple Values with Set Problem

2010-01-06 Thread Victor Subervi
but the sets which throw warnings. What am I missing? TIA, Victor -- The Logos has come to bear http://logos.13gems.com/

Re: Another Inserting Multiple Values with Set Problem

2010-01-06 Thread Victor Subervi
there. No, that thew the same errors. I know you have to enclose the sets in parentheses and individually quote each element. V - michael dykman On Wed, Jan 6, 2010 at 9:32 AM, Victor Subervi victorsube...@gmail.com wrote: On Wed, Jan 6, 2010 at 10:23 AM, Michael Dykman mdyk...@gmail.com wrote

Re: Another Inserting Multiple Values with Set Problem

2010-01-06 Thread Victor Subervi
On Wed, Jan 6, 2010 at 12:14 PM, Michael Dykman mdyk...@gmail.com wrote: so you dropped the quotes around the unneccessarily bracketed expression? It's hard to diagnose when your example isn't even what you think is syntactically correct. Here's my example again. Syntactically correct. From

Re: Another Inserting Multiple Values with Set Problem

2010-01-06 Thread Victor Subervi
On Wed, Jan 6, 2010 at 2:18 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Wed, Jan 6, 2010 at 11:39 AM, Victor Subervi victorsube...@gmail.com wrote: Here's my example again. Syntactically correct. From my original post: update products set SKU=prodSKU2, Category=prodCat1

Re: Another Inserting Multiple Values with Set Problem

2010-01-06 Thread Victor Subervi
On Wed, Jan 6, 2010 at 2:34 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Wed, Jan 6, 2010 at 1:25 PM, Victor Subervi victorsube...@gmail.com wrote: mysql update products set SKU=prodSKU2, Category=prodCat1, Name=name2, Title=title2, Description=descr, Price=22.55

Re: Another Inserting Multiple Values with Set Problem

2010-01-06 Thread Victor Subervi
On Wed, Jan 6, 2010 at 2:40 PM, Michael Dykman mdyk...@gmail.com wrote: How about you show us the schema for the table so we know what is defined as what? Done in last email. Also, as the update does succeed, it would be interesting to see what value actually got stored. After you have

Re: How Set Up This Table

2010-01-04 Thread Victor Subervi
On Mon, Jan 4, 2010 at 10:40 AM, Arthur Fuller fuller.art...@gmail.comwrote: The ProductPackages table is what is known as an associate table, and is used to implement a many-to-many relationship. You only need it if a given product can be in multiple packages. If not, then you can eliminate

Re: How Set Up This Table

2010-01-02 Thread Victor Subervi
On Sat, Jan 2, 2010 at 11:20 AM, Arthur Fuller fuller.art...@gmail.comwrote: Hi Victor. I think that the first thing you need to consider is whether a product can be in more than one package, and second is whether a package can be in another package. Also, I don't know why you need to auto

Re: How Set Up This Table

2010-01-02 Thread Victor Subervi
On Sat, Jan 2, 2010 at 12:03 PM, prabhat kumar aim.prab...@gmail.comwrote: primary key Oh! PK is primary key! a compound key is a key that consists of 2 or more attributes that uniquely identify an entity occurrence. Thanks. V

Re: How Set Up This Table

2010-01-02 Thread Victor Subervi
On Sat, Jan 2, 2010 at 11:20 AM, Arthur Fuller fuller.art...@gmail.comwrote: Hi Victor. I think that the first thing you need to consider is whether a product can be in more than one package, and second is whether a package can be in another package. Also, I don't know why you need to auto

How Set Up This Table

2010-01-01 Thread Victor Subervi
, in that one association may have 2 products and another 20. What is the best way to MySQL this? TIA, Victor -- The Logos has come to bear http://logos.13gems.com/

Inserting Multiple Values with Set

2010-01-01 Thread Victor Subervi
| +-+--+---+ | Warning | 1265 | Data truncated for column 'colorsShadesNumbersShort' at row 1 | +-+--+---+ 1 row in set (0.00 sec) Please advise. TIA, Victor

Re: Inserting Multiple Values with Set

2010-01-01 Thread Victor Subervi
On Fri, Jan 1, 2010 at 4:34 PM, Don Read don_r...@att.net wrote: On Fri, 1 Jan 2010 14:34:48 -0500 Victor Subervi said: Hi; snip The following insert chokes when I try to insert multiple values from the sets: insert into products (SKU, Category, Name, Title, Description, Price

last_insert_id

2009-12-27 Thread Victor Subervi
row in set (0.00 sec) mysql select last_insert_id() from products; +--+ | last_insert_id() | +--+ |0 | +--+ 1 row in set (0.00 sec) mysql Now, I was expecting 1, not 0! What up? TIA, Victor

Re: last_insert_id

2009-12-27 Thread Victor Subervi
On Sun, Dec 27, 2009 at 11:27 AM, Mattia Merzi mattia.me...@gmail.comwrote: 2009/12/27 Victor Subervi victorsube...@gmail.com: mysql select * from products; [...] mysql select last_insert_id() from products; [...] Now, I was expecting 1, not 0! What up? [...] LAST_INSERT_ID

Re: last_insert_id

2009-12-27 Thread Victor Subervi
On Sun, Dec 27, 2009 at 12:00 PM, Michael Dykman mdyk...@gmail.com wrote: last_insert_id() returns the last id auto-incremented in *the current session*. If you disconnect and reconnect, it can not be retrieved. Ahah! So how do I retrieve the last id inserted irrespective of connection? TIA,

Re: last_insert_id

2009-12-27 Thread Victor Subervi
On Sun, Dec 27, 2009 at 1:30 PM, Gary Smith li...@l33t-d00d.co.uk wrote: Victor Subervi wrote: On Sun, Dec 27, 2009 at 12:00 PM, Michael Dykman mdyk...@gmail.com wrote: last_insert_id() returns the last id auto-incremented in *the current session*. If you disconnect and reconnect

Join Statement

2009-12-14 Thread Victor Subervi
statement fails. Please advise. TIA, Victor

Re: Join Statement

2009-12-14 Thread Victor Subervi
On Mon, Dec 14, 2009 at 12:37 PM, Peter Brawley peter.braw...@earthlink.net wrote: ... on t.ProdID-p.ID; Your join clause subtracts the two IDs, so it's on IDs that differ, and apparently there aren't any. I beg to differ: mysql select SKU, Quantity, Name, Price, p.sizes,

Re: Join Statement

2009-12-14 Thread Victor Subervi
On Mon, Dec 14, 2009 at 1:04 PM, Peter Brawley peter.braw...@earthlink.netwrote: ...on t.ProdID-p.ID... _subtracts_ the two IDs. To match them use '=' rather than '-'. Thank you for all of you that caught that. V

Duplicate Entry, But Table Empty!

2009-12-13 Thread Victor Subervi
| YES | | NULL|| +--+-+--+-+-++ 3 rows in set (0.00 sec) Please advise. TIA, Victor

Re: Duplicate Entry, But Table Empty!

2009-12-13 Thread Victor Subervi
On Sun, Dec 13, 2009 at 12:21 PM, Pinter Tibor tib...@tibyke.hu wrote: Victor Subervi wrote: Hi; mysql insert into *tem126072414516* (ProdID, Quantity) values (2, 2); mysql select * from *tem126072385457*; mysql insert into *tem126072414516* (ProdID, Quantity) values (2, 2); ERROR 1064

inserting sets of data

2009-12-12 Thread Victor Subervi
Hi; I have a column defined as a set. How do I insert data into that column? Please give me an example. TIA, Victor

Re: inserting sets of data

2009-12-12 Thread Victor Subervi
On Sat, Dec 12, 2009 at 10:58 AM, David Giragosian dgiragos...@gmail.comwrote: On Sat, Dec 12, 2009 at 9:54 AM, Victor Subervi victorsube...@gmail.comwrote: Hi; I have a column defined as a set. How do I insert data into that column? Please give me an example. TIA, Victor Lots

Update Doesn't Update!

2009-12-11 Thread Victor Subervi
| colorsShadesNumbersShort | +---+--+ | | | +---+--+ 1 row in set (0.00 sec) Huh? TIA, Victor

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:43 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:33 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi victorsube...@gmail.com wrote: On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 8:43 AM, Johan De Meersman vegiv...@tuxera.bewrote: On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small

Re: Select Problem

2009-12-07 Thread Victor Subervi
On Sun, Dec 6, 2009 at 2:42 PM, Steve Edberg edb...@edberg-online.comwrote: At 1:26 PM -0500 12/6/09, Victor Subervi wrote: Hi; I have the following: mysql select * from categoriesProducts as c inner join relationshipProducts as r on c.ID = r.Child inner join categoriesProducts as p

Second Request: Challenging Select Statement

2009-12-07 Thread Victor Subervi
from information_schema.columns where table_name='products' and column_name='Categories'; will give me the column and its enumerations. How do I supply one of the enumerations from a column 'Categories' and get the ID? TIA, Victor

Re: Second Request: Challenging Select Statement

2009-12-07 Thread Victor Subervi
On Mon, Dec 7, 2009 at 8:08 AM, Tom Worster f...@thefsb.org wrote: On 12/7/09 5:26 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; I posted this Saturday. Perhaps it's too challenging for those who read it to answer. I hope someone can. I need to write a select statement

Select Problem

2009-12-06 Thread Victor Subervi
; ++--++ | ID | Category | Parent | ++--++ | 1 | prodCat1 | None | | 2 | prodCat2 | None | ++--++ 2 rows in set (0.00 sec) So I'm at a loss. No, 'prodCat2' isn't a column, but I don't understand how I specified that in my query. Please advise. TIA, Victor

Like Syntax

2009-12-05 Thread Victor Subervi
Hi; I remember vaguely how to do this but don't know how to google it: show tables like categories$; such that it will return tables such as: categoriesProducts, categoriesPrescriptions, etc. TIA, Victor

Re: Like Syntax

2009-12-05 Thread Victor Subervi
On Sat, Dec 5, 2009 at 11:09 AM, Michael Dykman mdyk...@gmail.com wrote: show tables like 'categories%'; Thanks. V

Challenging Select Statement

2009-12-05 Thread Victor Subervi
the column and its enumerations. How do I supply one of the enumerations from a column 'Categories' and get the ID? TIA, Victor

Auto Increment Problem

2009-12-05 Thread Victor Subervi
in set (0.00 sec) Why the error? TIA, Victor

Re: Auto Increment Problem

2009-12-05 Thread Victor Subervi
Oops. Never mind. V On Sat, Dec 5, 2009 at 1:19 PM, Victor Subervi victorsube...@gmail.comwrote: Hi; mysql insert into categories (Category, Parent) values ('test', NULL); ERROR 1062 (23000): Duplicate entry '0' for key 1 mysql describe categories

Creating Table Through Union

2009-11-22 Thread Victor Subervi
, Victor

Re: Creating Table Through Union

2009-11-22 Thread Victor Subervi
On Sun, Nov 22, 2009 at 9:29 PM, Gavin Towey gto...@ffn.com wrote: The form would be like: CREATE TABLE products SELECT b0basics, b0fieldValues, s0prescriptions, s0prescriptions0doctors, s0prescriptions0patient, pics FROM table1 UNION SELECT b0basics, b0fieldValues, s0prescriptions,

Re: Foreign Keys Problem

2009-11-20 Thread Victor Subervi
On Thu, Nov 19, 2009 at 9:34 PM, Ye Yuan yuan4...@gmail.com wrote: Hi Victor, It looks to me the foreign key syntax is wrong. Can you create the Relationship table on your database by using below ddl? create table if not exists Relationship (ID integer auto_increment primary key, Parent

Foreign Keys Problem

2009-11-19 Thread Victor Subervi
' at line 3) Please advise. TIA, Victor

Grant Privileges Problem

2009-11-09 Thread Victor Subervi
Hi; I created a user and then granted privileges: grant all to victor identified by 'pw'; Looked good. Tried to log in as victor an no go. Please advise. Victor

Re: Grant Privileges Problem

2009-11-09 Thread Victor Subervi
Never mind. Had to add @'localhost' On Mon, Nov 9, 2009 at 4:20 PM, Victor Subervi victorsube...@gmail.comwrote: Hi; I created a user and then granted privileges: grant all to victor identified by 'pw'; Looked good. Tried to log in as victor an no go. Please advise. Victor

Re: Inserting an Image

2009-10-16 Thread Victor Subervi
that replace them. That's it! Wonder what the *#^%( difference that makes. V On Thu, Oct 15, 2009 at 4:54 PM, Michael Dykman mdyk...@gmail.com wrote: Victor, again, your question has more to do with python usage than MySQL per-se.. you would be better off pursuing these questions in a python forum

Inserting an Image

2009-10-15 Thread Victor Subervi
is simple, but I don't know what it is. TIA, Victor

Re: No tuples, but AttributeError about tuple!

2009-10-05 Thread Victor Subervi
4, 2009 at 2:04 PM, Victor Subervi victorsube...@gmail.com wrote: Hi; I have the following python code: sql = 'insert into products values(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);', (id, name, title, description, price, bedrooms, bathrooms

Re: No tuples, but AttributeError about tuple!

2009-10-05 Thread Victor Subervi
) values('1', 'name1', 'title1', 'descr1', '1.1', '2', '1', 'New', '1.5', 'new', 'princesse', 'princesse', '123 princesse', 'Not furnished', '', '', '', '', '', ''); Values are enclosed in single quotes for SQL. - Original Message - From: Victor Subervi victorsube...@gmail.com

No tuples, but AttributeError about tuple!

2009-10-04 Thread Victor Subervi
', '', '', '', '', '', ''); which I can enter into the database directly. However, when I try to do it through the script, I get the following error: AttributeError: 'tuple' object has no attribute 'encode' Why is that? There are no tuples here!! Nothing but strings!! TIA, Victor

Re: Nested Joins

2009-10-02 Thread Victor Subervi
Thanks! Got it! I was missing the word from... select * FROM %s c ... Thanks again ;) V On Thu, Oct 1, 2009 at 5:08 PM, Gavin Towey gto...@ffn.com wrote: Victor, Just noticed, the join condition from client to productions should be changed: select * from ben_franklin_planners c join

Another Join Problem

2009-10-02 Thread Victor Subervi
Hi; I get the following error: *SQL query:* SELECT ID, Item FROM products JOIN categories ON categories.ID = products.Category LIMIT 0 , 30; *MySQL said:* #1052 - Column 'ID' in field list is ambiguous Please note the error is about ambiguity. products has an ID field and so does categories.

Re: Another Join Problem

2009-10-02 Thread Victor Subervi
Thanks V On Fri, Oct 2, 2009 at 11:08 AM, Mark Goodge m...@good-stuff.co.uk wrote: Victor Subervi wrote: Hi; I get the following error: *SQL query:* SELECT ID, Item FROM products JOIN categories ON categories.ID = products.Category LIMIT 0 , 30; *MySQL said:* #1052 - Column 'ID

Nested Joins

2009-10-01 Thread Victor Subervi
Hi; I'm new to join statements. Here's my python syntax: cursor.execute('select * from %s left join products on %s.Item=products.Item (left join categories on products.Category=categories.ID);' % (client, client)) I believe it's clear how I want to nest, but I don't know how to repair my

Re: Nested Joins

2009-10-01 Thread Victor Subervi
On Thu, Oct 1, 2009 at 4:03 PM, Gavin Towey gto...@ffn.com wrote: Joins aren't nested like that, unless you use a subquery. I think you just need to remove the parens around the second join. I tried that and no go :( For better help: 1. show the real SQL -- echo the statement. Most

Re: Nested Joins

2009-10-01 Thread Victor Subervi
Well, your syntax is *exactly* what I had (with a few cosmetic changes). I've been over the MySQL manual on joins with no luck. I'll read over your resources tonight. Any other ideas would be appreciated. Thanks, V On Thu, Oct 1, 2009 at 4:49 PM, Gavin Towey gto...@ffn.com wrote: Victor

Create Syntax (easy)

2009-09-29 Thread Victor Subervi
Hi; Please give me the syntax below such that I can force the insert statements to use only selected values (item1, item2, item3): create table (field SOMETHING_HERE item1 item2 item3, ... ) TIA, Victor

Re: Create Syntax (easy)

2009-09-29 Thread Victor Subervi
That's it! Thanks, V On Tue, Sep 29, 2009 at 12:13 PM, David Giragosian dgiragos...@gmail.comwrote: On Tue, Sep 29, 2009 at 11:09 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; Please give me the syntax below such that I can force the insert statements to use only selected

Problem w/ mysqldump

2009-09-02 Thread Victor Subervi
the same thing from within MySQL? Can I at least print everything to screen and copy it? Where would I find my database in Windoze? TIA, Victor

Re: Problem w/ mysqldump

2009-09-02 Thread Victor Subervi
- From: news [mailto:n...@ger.gmane.org] On Behalf Of Emile van Sebille Sent: Wednesday, September 02, 2009 7:18 AM To: mysql@lists.mysql.com Cc: python-l...@python.org Subject: Re: Problem w/ mysqldump On 9/2/2009 3:43 AM Victor Subervi said... Hi: I have the following python

Re: Problem w/ mysqldump

2009-09-02 Thread Victor Subervi
for a mysql dump tool ;-) Mysql dump is the better way to go in either situation. -Original Message- From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Wednesday, September 02, 2009 1:43 PM To: Daevid Vincent; mysql@lists.mysql.com Subject: Re: Problem w/ mysqldump I

Re: Suppressing Warnings

2009-08-31 Thread Victor Subervi
Right. Perhaps you could enlighten me as to what I should code to prevent that warning? It repeats 2,400 times and makes finding the real errors a pain in the behind. Victor On Tue, Aug 25, 2009 at 12:42 AM, peng yao xwei...@gmail.com wrote: Warning: Can't create database 'spreadsheets

Suppressing Warnings

2009-08-24 Thread Victor Subervi
;') Warning: Can't create database 'spreadsheets'; database exists What do? TIA, Victor

Update Syntax

2009-07-26 Thread Victor Subervi
Hi; I would like to test the following: update maps set map where site=mysite; to see if there is such an entry in maps. If there is, then update. If there is not, then I would like to execute an insert statement. How do I do that? TIA, Victor

  1   2   3   4   5   6   7   8   >