Question on replication terminology

2009-04-27 Thread Vikram Vaswani
Hi I'm new to replication and looking through some docs on how to use it. Could someone please tell me if the following terms mean the same thing or, if not, what is the difference: master-master replication dual-master replication bidirectional replication TIA -BT

Help with formatting of 1:n relationship

2009-01-26 Thread Vikram Vaswani
Hello all I have a database with a 1:n relationship as follows: Item (1) fld1 fld2 ... Item_info (n) - fld1 fld2 ... My client wants me to export these linked records into an Excel file in the following format. item.fld1 item.fld2 ... item_info.fld1 item_info.fld2 ...

Re: Help with formatting of 1:n relationship

2009-01-26 Thread Vikram Vaswani
Hi Jerry Thanks for your input on this! I'm using an excel library that accepts a SELECT as input and generates an XLS file with the records as output. I'd like to use this where possible. However I don't know if it's possible to write a SELECT that compresses a 1:n relationship into a single

Re: Help with formatting of 1:n relationship

2009-01-26 Thread Vikram Vaswani
Hi, I did consider a procedure but the problem is that the client is still using MySQL 4.x, which afaik doesn't support stored procedures. An upgrade is not something they can do at this point, as they're using s shared host so the server isn't really under their control. I think what you're

Tips for optimizing stored procedures

2008-12-29 Thread Vikram Vaswani
Hi all I am new to stored procedures and have just started using them. Is there any Web site you could suggest which discusses common optimization tips for MySQL SPs? Vikram -- Operator: So what do you need? Besides a miracle. Neo: Guns. Lots of guns. -- The Matrix -- MySQL General

Question on default database for stored functions

2008-12-25 Thread Vikram Vaswani
Hi According to the MySQL manual, By default, a routine is associated with the default database.When the routine is invoked, an implicit USE db_name is performed (and undone when the routine terminates) However, when I tried accessing a stored routine from another database, I received an

Question on returning multiple rows from a stored procedure into a session variable

2008-12-24 Thread Vikram Vaswani
Hi Is there a way to write a stored procedure that returns a result set containing multiple rows? More specifically, I'm trying to return the multi-row result set as an OUT parameter, which I can then access via a session variable. If this is possible, could someone direct me to the

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

Help needed with MySQL C API-based client (segfault)

2003-09-18 Thread Vikram Vaswani
Hello, I need to write a simple C client for a project. I am using the MySQL C API. Attached is the code. It occassionally segfaults with no visible pattern. Could someone help me figure out why? Or any other comments on the code to help me make it better? /* client.c */ #include stdio.h

Using a foreign character set in MYSQL

2003-08-14 Thread Vikram Vaswani
Hello all. I am working with MySQL 4.0. I have a requirement to create a data-driven Web page to display Chinese text from a MySQL table. I'm completely new to this, can someone tell me exactly what I need to do to make this happen? 1. For example, how do I insert the Chinese text from my source

Re: Using a foreign character set in MYSQL

2003-08-06 Thread Vikram Vaswani
When I try copying and pasting it into the mysql client command-line, the data gets trashed. Not necessarily. May just be that the command-line window doesn't know to display Chinese unless you tell it to. What OS are you working on? Working on Windoze with a telnet window open to a Linux box

Primary/foreign keys and indexes

2003-07-28 Thread Vikram Vaswani
Hello all, I am working on a book on MySQL, and I need some assistance with deciding where some concepts should be dealt with. 1. I have dealt (briefly) with primary keys and indexes in a chapter called MySQL DML. I have not discussed foreign keys in this chapter. 2. I would like to discuss

Re: Help with DELETE and a subquery

2003-07-25 Thread Vikram Vaswani
an syntax error. Hope that ends the problems you had. Best regards Nils Valentin Tokyo/Japan 2003年 7月 25日 金曜日 12:58、Vikram Vaswani さんは書きました: Hi all, I have the following two tables: mysql SELECT * FROM clients; +-+-+ | cid

Help with DELETE and a subquery

2003-07-24 Thread Vikram Vaswani
Hi all, I have the following two tables: mysql SELECT * FROM clients; +-+-+ | cid | cname | +-+-+ | 101 | JV Real Estate | | 102 | ABC Talent Agency | | 103 | DMW Trading

Updating a record with MAX(value)

2003-07-24 Thread Vikram Vaswani
Hi all, Is there a way to update the record with maximum value in a table with another value? I am trying this: mysql update services set sfee = 1 where sfee = max(sfee); Query OK, 0 rows affected (0.06 sec) Rows matched: 0 Changed: 0 Warnings: 0 But it doesn't make any changes to the data.

Getting columns into a single row

2003-07-15 Thread Vikram Vaswani
Hi guys, I need some help with this. I have the following 3 tables. +--+---+ | uid | name | +--+---+ | 100 | sue | | 102 | harry | | 104 | louis | | 107 | sam | | 110 | james | | 111 | mark | | 112 | rita | +--+---+ +--+---+ | gid | name

Question on choosing a MySQL API

2003-03-20 Thread Vikram Vaswani
Hi, The MySQL API is available in a number of languages - PHP, Perl, C, Java, etc. I was wondering if anyone here had any thoughts on the decision criteria to be kept in mind when choosing which language to use when programming with the MySQL API? A brief list of these would be very helpful to

C API

2003-03-20 Thread Vikram Vaswani
Hi, Does anyone know which version of MySQL first exposed an API for developers? Is there a changelog somewhere that might have this info? I'm interested in seeing how the API has evolved over time. TIA, Vikram -- Luke: I don't believe it! Yoda: That, is why you fail. --Star

Re: MySQL book TOC

2003-02-10 Thread Vikram Vaswani
Jeremy - the first one ;) Any comments on the TOC? Vikram At 02:46 PM 2/8/03 -0800, Jeremy Zawodny wrote: On Fri, Feb 07, 2003 at 03:20:47PM +0500, Vikram Vaswani wrote: My name is Vikram Vaswani, and I'm currently working on the outline for a MySQL reference book. This is supposed

Re: MySQL book TOC

2003-02-10 Thread Vikram Vaswani
Hi Nasser, Usage?? well whoever goes to buy your book, must have some ideas in head for the usage.. I don't think you should waste trees on telling people things that don't help them. One Question: What makes this book different from the MySQL manual? Well, it's not supposed to replace the

MySQL book TOC

2003-02-08 Thread Vikram Vaswani
Hello all, My name is Vikram Vaswani, and I'm currently working on the outline for a MySQL reference book. This is supposed to be a comprehensive reference to MySQL 4, covering all aspects of the software, including the new transaction/subquery features. I have put together a draft table

Difference between MySQL versions

2003-01-31 Thread Vikram Vaswani
Hi there, Can someone point me to amn (exhaustive) list of features in MySQL Max that are not present in MySQL Standard? Or any other documentation that lists the differences between the two? Thanks in advance, Vikram -- Luke: I don't believe it! Yoda: That, is why you fail.

Re: Problem compiling 4.0.9-gamma on Windows

2003-01-31 Thread Vikram Vaswani
Hi all, I get this error when compiling MySQL 4.0.9-gamma on Windows .\debug\Strings.obj LINK : fatal error LNK1181: cannot open input file .\debug\Strings.obj Error executing link.exe. Am using VC++ 6.0 Any help you can offer would be appreciated. Thanks! Vikram