select records to send to another table in another database

2008-04-10 Thread Larry Brown
I have a slew of records that went to the wrong database. The tables have the same names and now I want to copy those records over to the correct database. Is there such a mechanism using the cli mysql application in Linux? Larry -- MySQL General Mailing List For list archives:

Re: select records to send to another table in another database

2008-04-10 Thread Larry Brown
very much. Larry -- Larry Brown [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

c api and creating looped queries

2004-08-27 Thread Larry Brown
I know this is more along the lines of a c question; however, I am trying to write a loop to iterate insertions into a mysql database and was hoping someone would have a quick fix for this. I am used to using php with the luxury of the following syntax some loop giving values $column1 and

Re: c api and creating looped queries

2004-08-27 Thread Larry Brown
On Sat, 2004-08-28 at 00:48, I wrote: I know this is more along the lines of a c question; however, I am trying to write a loop to iterate insertions into a mysql database and was hoping someone would have a quick fix for this. I am used to using php with the luxury of the following syntax

command line escape for apostrophe

2004-02-25 Thread Larry Brown
I usually use php for most of my work, but I have to run a fair percentage of maintenance etc from the mysql shell program. I have a record that has an apostrophe and so was inserted using php by escaping the ' with \ so that it was put in as \' and it shows up in the record as O'Brien as it

RE: command line escape for apostrophe

2004-02-25 Thread Larry Brown
My bad people. The error was elsewhere in the query, but the error happenned to describe the query as failing near where the apostrophe was. Sorry to waste anyone's time. Larry -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:25 PM

RE: order of elements in where clause

2004-01-26 Thread Larry Brown
that the index is not being used? Larry -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, January 24, 2004 8:14 PM To: Larry Brown; MySQL List Subject: Re: order of elements in where clause At 8:34 -0500 1/24/04, Larry Brown wrote: in a select statement

RE: order of elements in where clause

2004-01-26 Thread Larry Brown
: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Monday, January 26, 2004 10:27 AM To: Paul DuBois; MySQL List Subject: RE: order of elements in where clause ok, I have a table with 100,000+ records. 98% of these records are jobs that have been completed. I have created an index for status. Status=4

order of elements in where clause

2004-01-24 Thread Larry Brown
in a select statement, is the order of elements in the where clause the determining factor on what records are chosen first, second etc? for instance... select fname from maintable where status=1 and dob '2001-03-10'; does that mean that the records will first be checked for status creating a

query performance

2004-01-23 Thread Larry Brown
I have a db that had some 20,000 records or so in it. I have a query to find out how many jobs have been input during the current day. To add them I ran the following query... select count(idnumber) from maintable where inputdatetime '$date 00:00:00' and client='smith' $date is the current

RE: struggling newbie - datetime or timestamp problem

2004-01-05 Thread Larry Brown
Use your code to do this with. Create the table as listed, then on your app have your insert code reflect... $query = insert into all_articles values (null,now(),now(),'$text'); and update the table as listed ... $updateQuery = update all_articles set updateddate=now(),article='$text' where

RE: insert: auto increment field

2004-01-04 Thread Larry Brown
I like naming the fields... insert into product ( NumUsers,DataConnect,Type,NumRouters,NumSwitches,AvgServiceCallsWk ) values ( '456789','t1','new',2,2,10 ) I use php on a large web app that from time to time I have to add a field to a table. If I use the above syntax instead of w/o field

RE: Help:)

2004-01-04 Thread Larry Brown
try... update user set password=PASSWORD('xx') where user='root' and host='localhost'; (replacing the x's with the password) Larry -Original Message- From: Don Matlock [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 11:32 AM To: [EMAIL PROTECTED] Subject: RE: Help:)

RE: connecion error

2004-01-04 Thread Larry Brown
what command are you using to connect to the server? -Original Message- From: Cres Justado [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 3:43 PM To: [EMAIL PROTECTED] Subject: connecion error Hi! I am new in using mysql database server. I have installed MySQL Database

RE: MYsql wont start

2004-01-04 Thread Larry Brown
The error is just telling you the server isn't there. Is this RH? If it is run.. #service mysqld restart and see what messages you get if any and also check /var/log/mysqld.log and see what messages it is giving. If it shows it started correctly, connect from the command line before doing

RE: insert: auto increment field

2004-01-04 Thread Larry Brown
Is this a test db? If so go ahead and drop your records so there are none in there and start entering them and checking their id as you do. After dropping all records it should start back at 1 and increment forward. I don't know how the index went up to max for that field. Perhaps something

RE: MYsql wont start

2004-01-04 Thread Larry Brown
Message- From: Don Matlock [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 7:24 PM To: 'Larry Brown'; [EMAIL PROTECTED] Subject: RE: MYsql wont start Hi, Thanx for the prompt reply. What I did is I told X not to start on boot, so I went into /etc/inittab and told it to run at run

RE: Remote access FROM a secure server

2004-01-01 Thread Larry Brown
Have you tried to telnet to port 3306 on the server from your local machine to the foreign server? It should give you some feedback as to why your connection is refused. If it times out, the server probably had 3306 blocked. I've not used remote servers other than inside a secure facility so I

union?

2003-12-23 Thread Larry Brown
I'm trying to figure out how to combine these two tables. I have.. t1 date accidentInfo cost t2 date upgradeInfo whereUpgraded Salesman cost I want to combine the two in a way to reference each piece of data such as t1.accidentInfo,t2upgradeInfo and so on, but I need the resultset to be

union?

2003-12-23 Thread Larry Brown
I'm trying to figure out how to combine these two tables. I have.. t1 date accidentInfo cost t2 date upgradeInfo whereUpgraded Salesman cost I want to combine the two in a way to reference each piece of data such as t1.accidentInfo,t2upgradeInfo and so on, but I need the resultset to be

RE: load data in file

2003-12-20 Thread Larry Brown
If the servers are on the same local subnet, why not just map a network drive so both servers have access to the file locally. -Original Message- From: Hans Kind [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: load data in file Hi, We

mysql load_file retreival

2003-12-20 Thread Larry Brown
I have set up a script to recieve a pdf file and store it in a mysql db using update db set field=load_file('fileIncludingFile') where id=$id. Afterwards I can see the file has been uploaded into the blob field successfully and without errors. Now I want to get the file back out. I set up a

if function?

2003-12-08 Thread Larry Brown
Is there a way to write an if statement in mysql to affect the following?... if field a=0,b=0,c=0 then update d='complete' where the table consists of... a int(1), b int(1), c int(1), d char(8) |a |b |c |d | |1 |0 |0 |null | |1 |1 |0

unexpected results from query between tables

2003-10-27 Thread Larry Brown
I apparently am misunderstanding how the select works by referencing data in two different tables. I have used a similar statement to the one that follows with success, but there must be something different here that reveals a lack of fundamental understanding as to how it works. If someone

RE: unexpected results from query between tables

2003-10-27 Thread Larry Brown
' |-+--- | | Larry Brown | | | [EMAIL PROTECTED]| | | tworks.com | | | | | | 27/10/2003 15:24

illusive query

2003-10-27 Thread Larry Brown
Earlier I was given help understanding the need for using a left join. This was a precursory query to arrive at my final solution which I had not touched on since I believed that by getting the join correct I could get the result. It seems to be evading me though. Still using the following

php temp table question

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will allow a temp table created by a script to linger around and cause a problem with the next execution of the script when it tries to create the temp table again? Also if it does present a problem with the next script execution

php temp table question (for mysql)

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will allow a temp table created by a script to linger around and cause a problem with the next execution of the script when it tries to create the temp table again? Also if it does present a problem with the next script execution

RE: php temp table question

2003-10-27 Thread Larry Brown
Thanks, I got the answer from a php developer. In case anyone is wondering, according to him the table is dropped at the end of the script execution regardless of whether you use persistent connections or not. -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Monday

RE: I can't figure out what I thought would be a simple query..

2003-10-27 Thread Larry Brown
I'm interested to see what kind of solution is offered for this as I could use it myself. I'm having to do this programatically on an expternal script that selects distinct non_unique_id and the takes the result and loops through each one with sort by endtime desc limit 1 and then either do

query challanged newbie

2003-07-22 Thread Larry Brown
I am having some weird problem figuring this seemingly simple query out. Here are the two tables from which I have to run the query Table alpha: id int(3) not null auto_increment, name char(12) not null, primary key(id) example data 1 fred 2 bob 3 sam 4 rita 5 george 6 laura 7 nancy Table

mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
How do you determine whether or not it is faster/more efficient to run a complicated query or to run multiple simple queries and join / manipulate the results with PHP? sql Larry S. Brown Dimension Networks, Inc. (727) 723-8388

RE: My new forum

2003-01-09 Thread Larry Brown
I appreciate that the guy wants to build traffic on his list, but I have to say that I enjoy having this list as busy as it is. People are pretty much always there to chime in. I'm on a javascript list that I get maybe 4 e-mails a day. Asking a question there result in a nice long wait. Here's

RE: converting text to hypertext

2003-01-08 Thread Larry Brown
-8388 -Original Message- From: Rick Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:58 PM To: Larry Brown Cc: [EMAIL PROTECTED] Subject: RE: converting text to hypertext Larry, This is the code I'm using. I'm pretty new to PHP, so there may be a simple solution

RE: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Larry Brown
the error is the same! - Original Message - From: Larry Brown [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Monday, January 06, 2003 6:28 PM Subject: RE: [PHP] Re: PHP and MySQL bug This definitely sounds like a buggy installation or there may be some problem

RE: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Larry Brown
* Try add to /etc/hosts the name and ip of DB is located I'm using Windows 2000. In Windows2000 make the same changes in winnt/system32/drivers/etc/hosts. If it connects the first time and every time thereafter that you recreate the connection it should not be anything to do with resolving the

RE: What MySQL is

2003-01-07 Thread Larry Brown
How about? MySQL is an Open Source data storage program that runs quietly in the background of your computer (a Database). It stores data for your programs and allows you to interface with that data using SQL commands (see reference manual). It is also quit scallable to run as simple a program

RE: question

2003-01-06 Thread Larry Brown
Which client are you using? The MySQL client that comes with the server is not GUI based so there are no menus. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Aleksandar Mitrakovic [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 5:53 AM To:

RE: Hiding the password

2003-01-06 Thread Larry Brown
To: Larry Brown; MySQL List Subject: Re: Hiding the password No, we are not talking about the staff of the hosting company. The hosting company runs a single Apache server on a single account on that server for all sites that are sitting on that computer. If the user that runs the web server has access

RE: [PHP] Re: PHP and MySQL bug

2003-01-06 Thread Larry Brown
, 2003 1:09 PM To: MySQL List; [EMAIL PROTECTED] Subject: [PHP] Re: PHP and MySQL bug The problem is if I close the connection and reopen it the query is done, but if I remain with the same connection has the previous query, mysql returns an error. - Original Message - From: Larry Brown [EMAIL

RE: Hiding the password

2003-01-06 Thread Larry Brown
: Larry Brown; MySQL List Subject: Re: Hiding the password - Original Message - From: William R. Mussatto [EMAIL PROTECTED] To: Octavian Rasnita [EMAIL PROTECTED] Cc: Larry Brown [EMAIL PROTECTED]; MySQL List [EMAIL PROTECTED] Sent: Monday, January 06, 2003 7:07 PM Subject: Re: Hiding

Re: Hiding the password

2003-01-06 Thread Larry Brown
One other thing about that is that on the section it describes apache it is chrooting the web server separate from other processes on the server. You can chroot the sites handled by apache as well, I just don't have a good example link to offer you. MySQL Larry S. Brown Dimension Networks, Inc.

RE: Hiding the password

2003-01-06 Thread Larry Brown
/ are yours and only yours. The sys admin can give or take away ls from your bin and so on. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 5:39 PM To: Larry Brown; MySQL List Subject: Re: Hiding

Re:PHP and MySQL bug

2003-01-05 Thread Larry Brown
Try replacing the following line... @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't work With... $query = UPDATE d SET h='$h' WERE id='$id'; $queryr = mysql_query($query) or die(The sql statement does not execute); if(mysql_affected_rows() !== 1) { die(The sql

RE: PHP and MySQL bug

2003-01-04 Thread Larry Brown
I'd like to try and see if I can find the problem as I write with PHP for MySQL quite a bit. However, without the specifics of how the script is running as is, I can't tell where the problem is. Write a quick script in complete detail that does what your post is doing and I'll look for anything.

RE: Hiding the password

2003-01-04 Thread Larry Brown
First, why are we conceding that everyone can find out your id and password? Your hosting company has your site separated from other customers' sites right? So we are just talking about the development team for your site being privy to this information. Second, if you are referring to the staff

RE: Hiding the password

2003-01-04 Thread Larry Brown
wrong or if there is something I'm missing here please let me know. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: wcb [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 04, 2003 2:55 PM To: Larry Brown Subject: Re: Hiding the password Hi! I may

RE: Hiding the password

2003-01-04 Thread Larry Brown
reason. If someone knows differently please let me know. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: wcb [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 04, 2003 3:52 PM To: Larry Brown Subject: Re: Hiding the password Hi! Oh no, the people who

RE: Starting of MySQL with redhat 8

2002-12-24 Thread Larry Brown
To start the server run the following... service mysqld start once it is started you can check to see if it running by using... ps aux which will show the processes running and look for mysql Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Scott Pippin

lost field changes

2002-12-23 Thread Larry Brown
Is there any explination as to how this could happen. I had two fields that somehow showed up as tinyint when they must have started out as char or varchar. I changed them to char and tested it by adding data which worked. I was able to then pull the characters back out of the database

console freezes when starting mysqld

2002-01-18 Thread Larry Brown
I am running two different servers, one with the tarball distro and the other with an rpm. Both are on Redhat 7.1. Upon executing mysql.server or safe_mysqld the console executes the command but does not return to a prompt. I can change to another console and see the server started ok. I can

console hang.

2002-01-18 Thread Larry Brown
I am running MySQL on Redhat and when I use the script that comes with MySQL (mysql.server) or safe_mysqld the command runs and starts the server. However; the prompt does not return. I have to switch consoles. (bash) Does anyone have any idea how I can avoid this? (the script from the rpm is