PHP/MySQL Problem

2004-11-05 Thread Yahoo Default User
Hi Guys, I have a problem with MySQL in conjunction with PHP so I also decided to post here: I have a PHP script that contains two consecutive MySQL queries, something like this: Query 1: Delete some rows from Table A Query 2: Insert some rows into Table A The problem is, only Query 2 seems to

Re: mySQL Clustering and HA (NDB - Emic Networks Solution - Replication) : Enterpise Use

2004-11-05 Thread Gleb Paharenko
Hi. About stability of MySQL Cluster you can read at www.mysql.com/it-resources/case-studies/b2.php o Does the memory size limit the data we can manage? If it is a memory based solution it should mean that it can handle of a very limited number of databases/tables/rows, based on the

Re: Load data Infile update?

2004-11-05 Thread Gleb Paharenko
Hi. If your table has a unique index on field 'name', then use load data infile 'file' replace into table 'table'; Lewick, Taylor [EMAIL PROTECTED] wrote: Can I perform an update on a table using load data infile..? If I have the following table... Name Score Rank

Re: load index into cache not working

2004-11-05 Thread Gleb Paharenko
Hi. There is a bug: http://bugs.mysql.com/bug.php?id=4285. Mark Maunder [EMAIL PROTECTED] wrote: I have a large fulltext index (the MYI file is about 750 Megs) and I've set my key_buffer_size to 1 Gig. I do: load index into cache fttest; and I watch the Mysql process in memory,

Re: Database Connection using DSN

2004-11-05 Thread Gleb Paharenko
Hi. See: http://dev.mysql.com/doc/mysql/en/ODBC_Connector.html When you call mysql_real_connect you use mysqlclient library, which connects to server directly (you don't need to configure ODBC). To connect using DSN, you should use ODBC API. ODBC and MySQL are completly different things.

Re: 4.1.7 serious problems

2004-11-05 Thread Gleb Paharenko
Hi. There were several posts in list like yours. Do you use InnoDB tables? Try to increase values of key_buffer_size, read_buffer_size and so on. Ugo Bellavance [EMAIL PROTECTED] wrote: Hi, I've upgraded one of my servers (test) to 4.1.7 this week, all went ok. Now I'm

Re: How to read TINYBLOB fields from the database

2004-11-05 Thread Gleb Paharenko
Hi. I've run mysqltcl binarytest.tcl (from source distribution) and everything works fine on my W2k Professional SP4, ActiveTcl8.5.0.0b2-win32-ix86-99907, mysqltcl-2.50 windows binary distribution. Did you read FAQ on http://www.xdobry.de/mysqltcl/index.html#faq (the main site of mysqltcl)?

RE: PHP/MySQL Problem

2004-11-05 Thread Chris Blackwell
when asking a question, it always helpful to post you code/queries so we can see what is happening. but tbh, this sounds like it's a php code problem. you have established that both queries work, on there own I'm don't know anything about php, but it sounds like you are not executing the first

Re: Problem with date field

2004-11-05 Thread Markus Grossrieder
What's going on here? God knows ! Maybe providing some information (OS, version, host app(if any), code example, db description, etc.) would permit some humble humans to take a guess ... - Original Message - From: Steve Grosz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday,

Re: PHP/MySQL Problem

2004-11-05 Thread Gleb Paharenko
Hi. How did you check that Query 2 has been executed? You may add to your php.ini file mysql.trace_mode = On to see some warnings and errors. Yahoo Default User [EMAIL PROTECTED] wrote: Hi Guys, I have a problem with MySQL in conjunction with PHP so I also decided to post here:

Re: nebiew migrate access tables to mysql

2004-11-05 Thread Gleb Paharenko
Hi. Put Purge into backticks. `Purge` char(1), spiv007 [EMAIL PROTECTED] wrote: The complete error is: ERROR 1064 (42000) at line 355: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

Re: BLOB datatype

2004-11-05 Thread Gleb Paharenko
Hi. create table btable(blb blob); Hi List, Can any one show me the practical query of creating a table which should contain a column with BLOB Datatype. --Nikhil. Mulley, Nikhil [EMAIL PROTECTED] wrote: -- For technical support contracts, goto

Re: Problem with date field

2004-11-05 Thread Gleb Paharenko
Hi. If you send us output of show create table 'table_with_date_field', and queries, which you use to insert and retrieve date, may be we will be able to help you. Steve Grosz [EMAIL PROTECTED] wrote: Why am I having a problem getting a date field to hold date? I will store

Re: nebiew migrate access tables to mysql

2004-11-05 Thread spiv007
It worked great but I would like to know why, thank! On Fri, 05 Nov 2004 13:42:29 +0200, Gleb Paharenko [EMAIL PROTECTED] wrote: Hi. Put Purge into backticks. `Purge` char(1), spiv007 [EMAIL PROTECTED] wrote: The complete error is: ERROR 1064 (42000)

RE: Database Connection using DSN

2004-11-05 Thread lakshmi.narasimharao
Hi, Thank you for your reply. After establishing a connection to the Database using ODBC API, can we use the mysql API's like mysql_query() instead of using MyODBC API's. Thanks in Advance. Regards, Narasimha -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent:

Re: 4.1.7 serious problems

2004-11-05 Thread Ugo Bellavance
Gleb Paharenko wrote: Hi. There were several posts in list like yours. Do you use InnoDB tables? Try to increase values of key_buffer_size, read_buffer_size and so on. InnoDB is enabled but no InnoDB table is used yet (coming soon). However, it crashes with only 1 client connected. There is

Optimize query and/or db structure, FullText search + sort by other fields

2004-11-05 Thread Aleksandr Guidrevitch
Hi All, this was already posted on mysql forum preformance, but forums are really slow, so sorry for the crosspost :) My objective is to implement quick, really quick complex fulltext search with 'order by' ( 2 seconds). The actual table I'd like to search is `lot`. I've created 2 helper tables

Update query help

2004-11-05 Thread Jeff McKeon
I have two tables. One has a list of customers. The other has a record of customer transactions including unix datestamps of each transaction. I've added a field to the customer table called First_Transaction I want to update this field with the datestamp of the first transaction for each

Column grouped by months

2004-11-05 Thread Scott Hamm
My current database: mysql SELECT - Category.Category, - GoalData.Reqvalue, - GoalData.GoalMonth - FROM - goaldata, - category - WHERE - goaldata.catid=category.id; +-+--+---+ | Category

Re: Update query help

2004-11-05 Thread SGreen
Break it down into two steps. Compute your new values by customerid, then update your customer table with your computed data. CREATE TEMPORARY TABLE tmpFirstTran SELECT CustID, min(Datestamp) as mindate from Transactions group by CustID; update Customer c INNER JOIN tmpFirstTran ft ON ft.CustID

Re: Column grouped by months

2004-11-05 Thread Brent Baisley
You're kind of mixing display formatting with data retrieval. MySQL is a database, so it's display options for data are fairly limited, that's usually the job of the front end. But, if you still want to push it to format the way you requested, you need to do a join. Essentially, you're going

Slow Inner Joins

2004-11-05 Thread John Wall
I am using 4.1 with inner joins, and my query is taking about 9.4 seconds to excute now. I used looping functions before in php, but I wanted one sql to do it all SELECTlocation FROM kanban_cards WHERE id IN(SELECT Max(id) FROM kanban_cards GROUP BY part, kan_number ORDER BY part,

Re: Column grouped by months

2004-11-05 Thread Michael Stassen
I believe you need a self join. Something like SELECT c.Category, g11.Reqvalue AS Nov, g12.Reqvalue AS Dec FROM goaldata g11 JOIN goaldata g12 ON g11.catid = g12.catid AND g11.GoalMonth = 11 AND g12.GoalMonth = 12 JOIN category c ON g11.catid=c.id; This might also work: SELECT

Changing Date Type

2004-11-05 Thread Amit_Wadhwa
I know that defining a Data datatype in a table renders the date in the form that the database is set to, Ie. -mm-dd by default. I want this to remain, but for one particular table, I want to set it to d-mmm-yy Eg. 5-nov-04 or 15-nov-04 instead of 2004-11-05 like the rest of my tables. I do

RE: Update query help

2004-11-05 Thread Jeff McKeon
Yeah I thought of that but was hoping not to have to use a temp table. Thanks! Jeff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 9:25 AM To: Jeff McKeon Cc: [EMAIL PROTECTED] Subject: Re: Update query help Break it down into two

ODBC Initial Setup Problems

2004-11-05 Thread Rick Dwyer
Hello All: I am trying to configure ODBC for MySQL but have been unable to make a connection. We are running MySQL 4.0.15 supplied by Server Logistics on OS X 10.3.5. I have installed their ODBC Driver and 4 files show up in the library/MyODBC/Lib/ directory: libmyodbc3_r-3.51.06.bundle

Re: Changing Date Type

2004-11-05 Thread Martijn Tonies
I know that defining a Data datatype in a table renders the date in the form that the database is set to, Ie. -mm-dd by default. I want this to remain, but for one particular table, I want to set it to d-mmm-yy Eg. 5-nov-04 or 15-nov-04 instead of 2004-11-05 like the rest of my

RE: Column grouped by months

2004-11-05 Thread Scott Hamm
Michael and Shawn's suggestions came into exactly same error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Dec, I'm running 5.0.1-alpha-nt. -Original Message- From: Michael

RE: Column grouped by months

2004-11-05 Thread Scott Hamm
This shouldn't be a problem because the data that I list here are only a required amount for operators to perform, hence no calculations required. A list of 17 categories is maximum and I only wanted to list 3 months in advance. -Original Message- From: Brent Baisley [mailto:[EMAIL

Re: Column grouped by months

2004-11-05 Thread Michael Stassen
I can't seem to get to the online manual to check at the moment, but I'd guess that dec is a reserved word. Sorry about that. Just put single quotes around it. SELECT c.Category, g11.Reqvalue AS 'Nov', g12.Reqvalue AS 'Dec' FROM goaldata g11 JOIN goaldata g12 ON g11.catid =

Re: Column grouped by months

2004-11-05 Thread Michael Stassen
Michael Stassen wrote: I can't seem to get to the online manual to check at the moment, but I'd guess that dec is a reserved word. DEC is short for DECIMAL. I should have remembered that. Sigh... Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: Optimize query and/or db structure, FullText search + sort by other fields

2004-11-05 Thread SGreen
I found your query hard to understand, however it seems the optimizer could read it just fine. I VERY MUCH dislike using the comma-separated list of table names to declare INNER JOINS. I think it allows me too much opportunity to accidentally create a Cartesian product by accidentally

Re: ODBC Initial Setup Problems

2004-11-05 Thread Ian Gibbons
On 5 Nov 2004 at 10:01, Rick Dwyer wrote: Hello All: I am trying to configure ODBC for MySQL but have been unable to make a connection. Hi, I have no experience of Mac OS X, but I believe it is linux-ish which means case- sensetive path names. The line below shows library with a lower

Re: Column grouped by months

2004-11-05 Thread SGreen
I FORGOT my GROUP BY (arrrgh!) [EMAIL PROTECTED] wrote on 11/05/2004 09:28:20 AM: You were very close. What you are trying to produce is called a cross-tab report or a pivot table (depending on who you ask) SELECT category.category,

RE: Changing Date Type

2004-11-05 Thread Amit_Wadhwa
Yes, but I want to be able to insert into the column dates in the format d-mmm-yy -Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 8:38 PM To: Wadhwa, Amit; [EMAIL PROTECTED] Subject: Re: Changing Date Type I know that defining a Data

Re: ODBC Initial Setup Problems

2004-11-05 Thread Rick Dwyer
On 5 Nov 2004 at 10:01, Rick Dwyer wrote: Hello All: I am trying to configure ODBC for MySQL but have been unable to make a connection. Hi, I have no experience of Mac OS X, but I believe it is linux-ish which means case- sensetive path names. The line below shows library with a lower case L:

Re: Changing Date Type

2004-11-05 Thread Martijn Tonies
Yes, but I want to be able to insert into the column dates in the format d-mmm-yy That's a different story. Question though: why? Read some docs: http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html btw, why is your e-mail important or high priority to me or the list? With regards,

Re: Problem with date field

2004-11-05 Thread Steve Grosz
CREATE TABLE `events` ( `eventID` tinyint(4) NOT NULL auto_increment, `eventDate` date NOT NULL default '-00-00', `eventTitle` tinytext NOT NULL, `eventDesc` mediumtext NOT NULL, PRIMARY KEY (`eventID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | Gleb Paharenko [EMAIL PROTECTED] wrote

Re: Problem with date field

2004-11-05 Thread Steve Grosz
This is on a Win2003 server system, and MySql server 4.1 Markus Grossrieder [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What's going on here? God knows ! Maybe providing some information (OS, version, host app(if any), code example, db description, etc.) would permit some

RE: Changing Date Type

2004-11-05 Thread Amit_Wadhwa
Because im reading data from another source which is always going to be in this format, and then inserting into the database. Thought if there was a way I could escape having to change the format before I insert into mysql... Sorry abt the high importance, it was turned on by default in my editor.

Re: Changing Date Type

2004-11-05 Thread Duncan Hill
On Friday 05 November 2004 15:56, [EMAIL PROTECTED] might have typed: Yes, but I want to be able to insert into the column dates in the format d-mmm-yy MySQL has a date format function that you can use to translate the format. The format in the table is always -mm-dd. Use translation

Re: Optimize query and/or db structure, FullText search + sort by other fields

2004-11-05 Thread Santino
Hi, Try to add an index on join fields ( search.lot_id, exchange_rate.currency_id,lot.currency_id) Your query can not use an index to sort because MySql can use only 1 index to search and sort and your sort is a function so it scans result rows and then it sorts the working table. Santino At

RE: Database Connection using DSN

2004-11-05 Thread SGreen
What Andrey was trying to say is that this group is specifically for the discussion of problems and development issues relating to the MySQL executables themselves, not how to connect to them. Your original question boils down to a basic lack of clue. There are two distinct methods currently

MySQL 4.0.20 for full-text searching with match against

2004-11-05 Thread Eve Atley
We are switching web servers, and they have installed Mysql 4.0.20. One of our apps uses full-text boolean text searching with MATCH AGAINST. I wanted to ensure this version of MySQL supports it, or if I need a newer version of MySQL. Can someone verify? Thanks, Eve -- MySQL General Mailing

Re: load index into cache not working

2004-11-05 Thread Mark Maunder
This bug is a problem with the reporting when sending a SIGHUP or the command mysqladmin debug. What I'm seeing is the process simply isn't growing in memory. I'm looking at the process size in 'top'. I do notice that it grows once I start hitting it with queries. I'd expect it to grow as soon

Re: nebiew migrate access tables to mysql

2004-11-05 Thread ian douglas
Put Purge into backticks. `Purge` char(1), It worked great but I would like to know why, thank! It could be that 'purge' is a reserved word in MySQL. I wanted to have a table with a shortened name of 'description' by trying to create a table with a 'desc' field, and MySQL had problems

Re: nebiew migrate access tables to mysql

2004-11-05 Thread Michael Stassen
The reserved words are listed in the manual http://dev.mysql.com/doc/mysql/en/Reserved_words.html. 'Purge' is on the list. Michael ian douglas wrote: Put Purge into backticks. `Purge` char(1), It worked great but I would like to know why, thank! It could be that 'purge' is a

Re: ANNOUNCE: SHSQL - SQL for LINUX/UNIX Shell scripts

2004-11-05 Thread David Griffiths
Wow - cool idea - nice job. Looking forward to playing with it. David. Eddy Macnaghten wrote: Hi all I have just released a utility (under the GPL) that enables SQL to be incorporated into UNIX/LINUX shell scripts (easier than using psql or similar with better integration). For more information

ORDER by date: reverse order

2004-11-05 Thread Jerry Swanson
I want to sort by date but the last date appears first. How to write such query? TH -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: ORDER by date: reverse order

2004-11-05 Thread Jay Blanchard
[snip] I want to sort by date but the last date appears first. How to write such query? [/snip] RTFM ORDER BY theDate DESC -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: ORDER by date: reverse order

2004-11-05 Thread DeRyl
write: order by date desc DeRyl - Original Message - From: Jerry Swanson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 05, 2004 8:00 PM Subject: ORDER by date: reverse order I want to sort by date but the last date appears first. How to write such query? TH --

Re: nebiew migrate access tables to mysql

2004-11-05 Thread spiv007
What about this? I will not take AUTO INCREMENT I tried removing the underscore and putting `AUTO INCREMENT` , but im getting the same error as before. CREATE TABLE if not exists TASK ( `Payment Date` DATE, ID INT AUTO_INCREMENT, CaseNumber CHAR(12) NOT NULL,

Re: nebiew migrate access tables to mysql

2004-11-05 Thread ian douglas
replied to him privately with this before I realized he'd sent a different copy with the list CC'd: CREATE TABLE if not exists TASK ( `Payment Date` DATE, ID INT AUTO_INCREMENT, CaseNumber CHAR(12) NOT NULL, Payment_Amount FLOAT(8,2), PRIMARY KEY (ID), KEY CaseNumber (

replication log error

2004-11-05 Thread Alvaro Avello
Hi. I'm having a problem with a slave replication server. the 'show slave status' command shows : mysql show slave status;

Re: MySQL 4.0.20 for full-text searching with match against

2004-11-05 Thread Gleb Paharenko
Hi. As of Version 4.0.1, MySQL can also perform boolean full-text searches using the IN BOOLEAN MODE modifier. Eve Atley [EMAIL PROTECTED] wrote: We are switching web servers, and they have installed Mysql 4.0.20. One of our apps uses full-text boolean text searching with MATCH

Re: Database Connection using DSN

2004-11-05 Thread Gleb Paharenko
Hi. No. [EMAIL PROTECTED] wrote: Hi, Thank you for your reply.=0D After establishing a connection to the Database using ODBC API, can we use the mysql API's like mysql_query() instead of using MyODBC API's. Thanks in Advance. Regards, Narasimha

Re: Column grouped by months

2004-11-05 Thread Gleb Paharenko
Hi. Use aliasing. Read carefully comments at http://dev.mysql.com/doc/mysql/en/JOIN.html Scott Hamm [EMAIL PROTECTED] wrote: My current database: mysql SELECT - Category.Category, - GoalData.Reqvalue, - GoalData.GoalMonth - FROM - goaldata, -

[OT] Strange message from mysql-help@lists.mysql.com

2004-11-05 Thread Santino
Hello, I have just received this message from [EMAIL PROTECTED]: At 21:17 + 5-11-2004, [EMAIL PROTECTED] wrote: To confirm that you would like [EMAIL PROTECTED] removed from the mysql mailing list, please click on the following link: ... Received: (qmail 20876 invoked by uid 48); 5 Nov 2004

SELECT where String

2004-11-05 Thread Dan Sashko
hello, I've a query that runs very slow: select name, count(id) where str_field = some string or (str_field string with nuber at end 1 and str_field string with nuber at end 9) group by name i have about 4mil records and the query takes about 3 minutes str_field, name are MUL indexes both

Advanced SELECT Syntax Help Needed!

2004-11-05 Thread Monique
Hi! I would love some help with my syntax (or another strategy). I keep bombing. I've simplified it. Here is the deal: Three files: Main: id, name Links1: id, linkname1 (a record may or may not exist for each record in Main) Links2: id, linkname2 (a record may or may not exist for each

RE: replication log error

2004-11-05 Thread Alvaro Avello
mysql show slave status\G; *** 1. row *** Master_Host: hubble Master_User: replica Master_Port: 3306 Connect_retry: 60 Master_Log_File: hubble-bin.009 Read_Master_Log_Pos: 646906124

Re: Advanced SELECT Syntax Help Needed!

2004-11-05 Thread Rhino
I'm not sure why you want to use a subquery; if MySQL is anything like DB2, a join usually performs better than a subquery and the optimizer converts a subquery to a join (under the covers) whenever it can anyway. Therefore, how about something like: select id, name, linkname1, linkname2 from

sql query to return unique ids from a table of date stamped results

2004-11-05 Thread Rob Keeling
I am trying to find the sql statement needed to extract, from a table of data with multiple instances of a id no, a list of unique id nos, picking the latest (by datestamp which is stored as a second field) so that a master list is updated. The application is a list of student photos, each

connection problem with 4.1.7

2004-11-05 Thread P.V.Anthony
Hi, I am having an intermitten connection problem with MySQL 4.1.7 . Here is the setup. Intel P4 with HT Fedora Core 1 kernel 2.4.27 smp MySQL version 4.1.7 (RPM install from mysql.org) Qmail with vpopmail using mysql (www.qmailtoaster.com) Sometimes I cannot login to qmail to check mail. Using

AW: connection problem with 4.1.7

2004-11-05 Thread Kostas Pyliouras
Hi, When you have this problem, do the MySQL client applications work? Have you tried logging in with the mysql client? Kostas -Ursprüngliche Nachricht- Von: P.V.Anthony [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 6. November 2004 02:36 An: [EMAIL PROTECTED] Betreff: connection

extracting ddl

2004-11-05 Thread Nathan Coast
Hi, is it possible to extract the ddl for a table or whole db? ie the ddl that would be needed to re-create that table. JBoss automatically creates some tables during ejb deployment and I want to move this to a manual process. cheers Nathan -- Nathan Coast Managing Director codeczar ltd

AW: extracting ddl

2004-11-05 Thread Kostas Pyliouras
Hi, All MySQL server installations ships with some client tools. Try executing the following statement on your server mysqldump -uUSERNAME -p DATABASENAME dump.sql After this operation dump.sql will include all information needed. The information can be loaded into another server issuing

Re: mysql admin clients

2004-11-05 Thread Karam Chand
Hello, Check out SQLyog at http://www.webyog.com/forums/index.php?s=94f4afb247fdfdfbd6435d793a56d60aact=STf=2t=977st=0#entry3909 Its FREE and very powerful. Regards, Karam --- leegold [EMAIL PROTECTED] wrote: newbie question about mysql admin clients. What are some good ones? And