How-to copy a column

2005-01-31 Thread Syed Ali
Does anyone know the easiest way to copy a column in mysql?

I have a table (table1) which has 4 columns, I want to copy all the
contents of col1 into col2. 
Col3 is the primary unique key, so the copy has to keep the data matched
with col3.

I guess one possible way is to do a select and output to a file and then
read from the file for input into col2.

Thank you..



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL and Perl DBI Persistent Connection

2004-01-16 Thread Syed Ali
Hello,

I have a Perl CGI script which uses DBI to access MySQL.
I noticed that each query through the Perl CGI script using DBI has a
connect, query and then quit.
I was wondering if there is a way of keeping the connection persistent
to Mysql through the Perl CGI script.

In my Apache httpd.conf I inserted PerlModule Apache::DBI before all
LoadModule lines, but that does not solve the problem.
I also downloaded the Apache::DBI module from CPAN and installed it.
Perhaps I need to do something else?

I also removed any disconnect statements in my Perl CGI script, but I
still see the quit in mysql.query.log.

Thank you...


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



How to move data between tables in a database?

2004-01-12 Thread Syed Ali
Hello,

I would like to move data between tables in mysql within the same
database, I am not sure what the best way to go about it is.
I do not need to move all the data in the tables, just the output of
some select statements.

I am using Perl DBI and MySql 4.0.15-standard on RedHat 8.0.
I guess I can run a select statement and copy all the data into a Perl
array, then copy the data into another MySql table and then delete from
the original table. But this seems like too much work, perhaps there
is an easier way?

Thank you...

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Representing time sheet data in Mysql

2003-09-29 Thread Syed Ali

Hello,

I am trying to store our timesheet data in the Mysql database.
I would appreciate suggestions on the database scheme to use.

One of the possible ways to do it is to have a table indexed with the employee ID and 
then having as many columns as there are days in the year.
This approach would mean that the table has 200 rows if we have 200 employees and it 
has 365 columns for each day of the year.

Another approach would be to index based on the number of days, i.e., have 365 rows 
and have as many columns as employees, i.e., 200 columns.

If an employee takes half a day off, then I can store an array in the value for that 
employee ID and that particular day.

I am sure there are other approaches to, and I would appreciate any suggestions.


Thank you...



RE: Representing time sheet data in Mysql

2003-09-29 Thread Syed Ali
So if you needed to know status of a work day for an employee day (say 9/1/2003), how 
did you go about looking it up in your table?
Assuming that a employee can be present (p), on vacation (v), sick day (s)?
Your table seems to store only the number of hours worked

Thank you,
Syed Ali
(609) 951-2989



-Original Message-
From: Dan Greene [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 29, 2003 11:12 AM
To: Syed Ali; [EMAIL PROTECTED]
Subject: RE: Representing time sheet data in Mysql


In the last timetracking system I built, I used a 'timeentry' table which was basically

timeentry_id (pk) 
employee_id 
date 
num_hours_worked
task_id

I put a few other indexes in there based on the searching that I had to do, but to 
each their own...


 -Original Message-
 From: Syed Ali [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 29, 2003 11:04 AM
 To: [EMAIL PROTECTED]
 Subject: Representing time sheet data in Mysql
 
 
 
 Hello,
 
 I am trying to store our timesheet data in the Mysql database.
 I would appreciate suggestions on the database scheme to use.
 
 One of the possible ways to do it is to have a table indexed 
 with the employee ID and then having as many columns as there 
 are days in the year.
 This approach would mean that the table has 200 rows if we 
 have 200 employees and it has 365 columns for each day of the year.
 
 Another approach would be to index based on the number of 
 days, i.e., have 365 rows and have as many columns as 
 employees, i.e., 200 columns.
 
 If an employee takes half a day off, then I can store an 
 array in the value for that employee ID and that particular day.
 
 I am sure there are other approaches to, and I would 
 appreciate any suggestions.
 
 
 Thank you...
 
 


Re: how include library correctly in a visual c++ 6 project

2001-11-15 Thread Syed Ali Dost Ali Dost

Hi Thomas

In VC++, go to project file, right clik there, select
setting then choose C/C++ then preprocessor. Here type
the path c:/mysql/include at include path options.
Also you have to add mysqlclient.lib for linker. To do
so you should go to Linker tab and explicitly type the
file in lib file text box (don't sperate files by ;).
Also put the path for additional lib i.e
c:\mysql\lib\debug. I've tried this  it works...

But I want to use Borland C++.do you or any one
else can reply to my previous mail


Regards,

Ali

--- thomas WOLFF [EMAIL PROTECTED] wrote:
 one question
 how to include your library in visual c++ 6 project
 because y have many problem y must redefine all path
 for include
 ex 
 #include mysql++ - #include
 ..\directory\mysql++
 
 thank you for your answer
 
 Thomas Wolff

-
 Akosystem 
 Am Tiefen Weg 17b 
 76547 Sinzheim
   
 Email: mailto:[EMAIL PROTECTED]
 Telefon: +49 (0) 7221 / 98 78 40
 Fax: +49 (0) 72 21/98 78 42 
 Handy France : +33 (0)6 84 20 50 86
  
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail

[EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




BCC32 problem.................

2001-11-14 Thread Syed Ali Dost

Hi

I'm using Borland BCC32  ILINK32 command line tools for windows to compile
 link the C source code which contains calls for mySQL C APIs. I've
downloaded the borland libraries. The problem I'm having is unable to refer
to mysqlclient.lib file from BCC32. The problem is bit confusing. Even for a
normal C code (not involving mySQL APIs) it compiles  link perfectly when I
use BCC32 without -c option (no supression of linker). But if I use BCC32
with -c option it compiles OK and even ILINK32 links the file ok
(apparently) but somehow it is not reading the different .obj files present
at \BCC55\bin ( i know this because I put  remove the path from options and
makes no difference). The result is the corrupted exe which throws run time
errors. Why I bother to use the -c option and link the objs by
ILINK32Because I've to put the mysqlclient.lib file at the link time
to avoid unreferrenced symbol error at link time.

Could any one pass me through this stage..My mind is now almost dead
on this issue..Please help me out!

Ali


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




lcc-win32 couldn't compile..........

2001-11-12 Thread Syed Ali Dost Ali Dost

Hi

I'm new mySQL user (on Windows). I tried to compile 
run the example C code myTest.c using lcc-win32 IDE
but it throws errors. Although I put proper header
path at setting...I think there is some problem with
linker. I also included the libmysql.lib file but in
vain..

When the same code is compiled  linked using MS-VC++,
it runs...Could anybody guide me how to tune
lcc-win32 or any other C IDE..I don't want to use
MS-VC++...

Ali


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




C IDE for Windows...........?

2001-11-11 Thread Syed Ali Dost

Hi...

I'm new to MySQL. I can play it by ODBC connectivity using JDBC-ODBC bridge.
But I want to write code in C using MySQL native C-APIs. One reason for me
to switch to MySQL is its C-APIs. I've been using Borland Turbo C/C++ 3.0
for a long time on DOS/Windows OS. When I try to include MySQL headers, it
throws errors...which I guess is the problem of long header file names (not
complaint with DOS 8.3 file name convention). I'm in search of an IDE that
can support MySQL and that should not be much different from the one I'm
used to. Could anybody help me out

Cheers..

Ali


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php