What is the primary avatar?
MySQL database development
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > MySQL database developmentGo to page: « previous | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | next »

  Top users: 
  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:
Wednesday, 17 January 2007
Formatting a subquery? Brian Dunning 18:43:57
 I can't get MySQL 5 to like this query. Can you tell what I'm trying
to do, and is there a problem with my formatting?

select account_id,picture_­id from pictures where account_id in
(select account_id from accounts order by rand() limit 20)
order by rand();

--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


comment 4 answer | Add comment
Index_Merge : Very slow Ratheesh K J 17:07:44
 Hello All,

Our queries were running fine on MySQL 4.1.11. Since we upgraded to MySQL 5.0.22 The same queries are taking a long long time to execute.

Running an explain on the queries shows an index_merge in the type column.

And it shows using intersect algorithm in Extra column of the output.

Previously(MySQL 4.1.11) Explain showed the usage of primary Key as the index.

How can this be resolved?

Thanks
Ratheesh K J
Add comment
MySQL Connector/ODBC v5 5.00.10 Failure Vincken Maxime 13:00:01
 Hi all,



I have tried to create a new dsn by using the following code in a command
line :



myodbcinstaller -s -a -c2 -n "test" -t "DRIVER=MySQL Connector/ODBC
v5;DATABASE=;UID=ro­ot;PWD=mypwd;PORT=33­07"



but I always received the same error: [ODBC_ERROR_INVALID_DSN][9] Invalid
datasource



I don't known what is wrong with this.



Can someone help me?



Maxime

comment 4 answer | Add comment
Problems with INSERT Haig Dedeyan 09:50:43
 Hi everyone,

I'm a dbase rookie and I've ran into a small problem.

I created a basic faq table and all is fine regarding displaying &
searching the Q & A's on a web page.

Up until now, I;ve entered all Q & A's from phpMyAdmin.

I'm trying to create an admin page to enter the Q & A's and for the most
part, it's working.

However, I keep getting the following error:

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 's
resources than dual monitor mode to generate the video output. Running
in dual' at line 2

when I try to add:

Note : Single-monitor mode uses more of your computer's resources than
dual monitor mode to generate the video output. Running in dual monitor
mode is recommended because it is more efficient.


My PHP code to add Q & A is:

mysql_query("INSERT­ INTO faqs
(Question, Answer, Category, Date) VALUES('$question',­ '$answer',
'$category', CURDATE() ) ")
or die(mysql_error());­


If I enter the above text directly intophpMyAdmin, all is fine.

Any help is greatly appreciated.

Thanks

Haig

--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


comment 4 answer | Add comment
mysql server has gone away Mayuran 09:33:30
 
Hi,

We are considering upgrading our production servers from using MySQL
3.23 to
MySQL 4.0 so I was asked to see how our scripts work with v4. I
installed v4 on
one of our test environments and immediately saw this:

DBD::mysql::st execute failed: MySQL server has gone away.

I googled it and read the suggestions in the MySQL documentation and
increased
the allowed packet size to max_allowed_packet = 256. This did not fix
it. Also, I
know that the connection isnt timing out.

Can someone please offer some advice on the matter, I am stumped. I
noticed that
if I set : $dbh->{mysql_auto_r­econnect} = 1 in my code that the problem
appears
to go away, but I still dont know what the real problem was, or if this
auto_reconnect
setting is causing any harm.

Any input is much appreciated,

Thank you

M. Yogarajah


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.­com/perl
To unsubscribe: http://lists.mysql.­com/perl?unsub=gcdmp­-msql-mysql-modules@­m.gmane.org


comment 9 answers | Add comment
Some strange problem SegFault at conn_->lock() Manuel Jung 08:07:11
 Hi everybody,
Im have a strange problem. My programm is multithreaded and has different
MySQL Connections on a per thread basis. This works very well. But now i
have rewriten a part of my code which affects one of the threads. But it
uses a great part of the well working classes.
Now i get a Segmentation Fault on executing execute() or store() (i tried
just these two). gdb get me this errormessages:
#0 0x00000000 in ?? ()
#1 0xb7ce1ca8 in mysqlpp::Query::loc­k (this=0x80b3de4) at query.cpp:137
#2 0xb7ce2ff6 in mysqlpp::Query::sto­re (this=0xb705eeb0,
str=0x80b3de4 " \v\b \v\b \v\b") at query.cpp:349
#3 0xb7ce32f0 in mysqlpp::Query::sto­re (this=0xb705eeb0, p=@0x80b3de4)
at /usr/include/c++/3.­3/bits/basic_string.­h:355
#4 0x08057cc7 in mysqlpp::Query::sto­re (this=0xb705eeb0)
at /usr/local/include/­mysql++/query.h:309
#5 0x08094391 in shark::DownloadCall­ (this=0x80bfdc0, Slot=0x80b3814)
at src/shark.cpp:69
#6 0x080732d3 in swarm::StartSlot (this=0x80bfdc0, Slot=0x80b3814)
at src/swarm.cpp:107
#7 0x0805b0ea in slots::SetSlots (this=0x80bfdc0, newSlots=1, maxSlots=10)
at src/slots.cpp:73
#8 0x08082955 in seal::SelfControl (this=0x80bfce0) at src/seal.cpp:78
#9 0x0808842d in boost::_mfi::mf0<vo­id, seal>::operator() (this=0x80b30d8,
p=0x80bfce0) at /usr/local/include/­boost/bind/mem_fn_te­mplate.hpp:45
#10 0x080883ac in operator()<boost::_­mfi::mf0<void, seal>,
boost::_bi::list0> (
this=0x80b30e0, f=@0x80b30d8, a=@0xb705f383)
at /usr/local/include/­boost/bind.hpp:229
#11 0x0808835c in boost::_bi::bind_t<­void, boost::_mfi::mf0<vo­id, seal>,
boost::_bi::list1<b­oost::_bi::value<sea­l*> > >::operator() (this=0x80b30d8)
at /usr/local/include/­boost/bind/bind_temp­late.hpp:20
---Type <return> to continue, or q <return> to quit---
#12 0x0808830f in
boost::detail::func­tion::void_function_­obj_invoker0<boost::­_bi::bind_t<void,
boost::_mfi::mf0<vo­id, seal>, boost::_bi::list1<b­oost::_bi::value<sea­l*> >>, void>::invoke (function_obj_ptr=
{obj_ptr = 0x80b30d8, const_obj_ptr = 0x80b30d8, func_ptr = 0x80b30d8,
data = " "}) at /usr/local/include/­boost/function/funct­ion_template.hpp:136­
#13 0xb7cb39c9 in boost::function0<vo­id,
std::allocator<boos­t::function_base> >::operator() ()
from /usr/local/lib/libb­oost_thread-gcc-mt-1­_33_1.so.1.33.1
#14 0xb7cb35fd in boost::thread_group­::size ()
from /usr/local/lib/libb­oost_thread-gcc-mt-1­_33_1.so.1.33.1
#15 0xb7c09504 in start_thread () from /lib/tls/i686/cmov/­libpthread.so.0
#16 0xb7b9d51e in clone () from /lib/tls/i686/cmov/­libc.so.6


Even the Query worked in this part of program well.
Has someone a idea what about this problem could be?
All other MySQL parts work well. Im sorry i cannot post some of my code,
this wont help and it is just too big, to help us. if i try connected() on
the connections it tells me it is just fine; no exception were thrown
either..

Thanks for reading and helping
Greetings
Manuel Jung

--
MySQL++ Mailing List
For list archives: http://lists.mysql.­com/plusplus
To unsubscribe: http://lists.mysql.­com/plusplus?unsub=g­cdmc-plusplus@m.gman­e.org


comment 1 answer | Add comment
mysql odbc query Rahulsk1947 06:04:54
 
hi, i am using mysql database and writing program in C#.i gota query
statement problem,maybe some1 can help.thanx

question 1)
//the code is below.

String empName;
OdbcCommand comm = new OdbcCommand("use employee", MyConnection); //use
employee database

Console.Write("Inpu­t name"); //input employee name
empName=Console.Rea­dLine();


comm.CommandText = "INSERT INTO employee (Name) values (empName)";

**##@#$#@* - how do i do that ? I want to get the user to input his name
and then be able to insert it into the database using the sQL insert comand
as above.



-------------------­-----------

question 2)

I would like the user to input wat table he would like to use.any idea how
to do it?

Console.Write("Inpu­t table name"); //input employee name
tableName=Console.R­eadLine();

OdbcCommand comm = new OdbcCommand(use tableName, MyConnection); //this
should use the name of the table the user specifies.


do let me know.thanx
--
View this message in context: http://www.nabble.c­om/mysql-odbc-query-­tf3024740.html#a8402­880
Sent from the MySQL - ODBC mailing list archive at Nabble.com.


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.­com/myodbc
To unsubscribe: http://lists.mysql.­com/myodbc?unsub=gcd­mo-myodbc@m.gmane.or­g


Add comment
DBBrowser for PostgreSQL, MySQL, FireBird, Oracle and others (gpl gnu license) Al_Dev 05:40:47
 If you used TOAD in oracle, DBBrowser is similar to that.
Developers need a tool like DBBrowser to work with SQL database.

DBBrowser is excellent tool and is quite useful for developers.
DBBrowser is released under gnu/gpl license.
DBBrowser is quite impressive and in future it will find rapid
adoption.

Please download DBBrowser from
http://databasebrow­ser.sourceforge.net/­

And see the feature comparison of DBBrowser with TOAD, ProDBA,
SQLTools at http://databasebrow­ser.sourceforge.net/­features.html

DBBrowser is written in Java and uses JDBC drivers.

It is supposed to support most of the SQL servers which have a stable
JDBC drivers.

Try out and let others know what you think about DBBrowser





___________________­____________________­____________________­____________________­_____
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.­com/games/front

--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


Add comment
Connection to vc++ Amit Nayak 00:44:55
 Hi I am a rookie at both vc++ and mysql..could you please guide me on
how do I establish a connection between the two is a simple manner.

Thanks,
Amit
comment 3 answer | Add comment
Insert ... Select troubles Ed Reed 00:44:55
 
I need some help creating an INSERT * SELECT statement that supplies a record counter in the returned items. Here's the task,

I have t1 and t2. t1 is GroupCount, ItemCount, Field1, Field2, Field3. t2 is Field1, Field2, Field3.

t1 has a multiple field unique key called Request that has GroupCount and ItemCount. I would like to create an INSERT * SELECT statement that takes the three fields from t2 and puts them into t1 and at the same time automatically fills the GroupCount and ItemCount field. My data in t1 should look like this.

+----------+-------­----+--------------+­--------------+-----­---------+
|GroupCount| ItemCount | Field1 | Field2 | Field3 |
+----------+-------­----+--------------+­--------------+-----­---------+
| 1 | 1 | data from t2 | data from t2 | data from t2 |
| 1 | 2 | data from t2 | data from t2 | data from t2 |
| 1 | 3 | data from t2 | data from t2 | data from t2 |
| 2 | 1 | data from t2 | data from t2 | data from t2 |
| 2 | 2 | data from t2 | data from t2 | data from t2 |
| 3 | 1 | data from t2 | data from t2 | data from t2 |
| 3 | 2 | data from t2 | data from t2 | data from t2 |
| 3 | 3 | data from t2 | data from t2 | data from t2 |
| 3 | 4 | data from t2 | data from t2 | data from t2 |
| 3 | 5 | data from t2 | data from t2 | data from t2 |
| 3 | 6 | data from t2 | data from t2 | data from t2 |
| 4 | 1 | data from t2 | data from t2 | data from t2 |
| 4 | 2 | data from t2 | data from t2 | data from t2 |
| 4 | 3 | data from t2 | data from t2 | data from t2 |
| 4 | 4 | data from t2 | data from t2 | data from t2 |
| 4 | 5 | data from t2 | data from t2 | data from t2 |
| 4 | 6 | data from t2 | data from t2 | data from t2 |
| 4 | 7 | data from t2 | data from t2 | data from t2 |
| 5 | 1 | data from t2 | data from t2 | data from t2 |
| 5 | 2 | data from t2 | data from t2 | data from t2 |
| 6 | 1 | data from t2 | data from t2 | data from t2 |
| 6 | 2 | data from t2 | data from t2 | data from t2 |
| 6 | 3 | data from t2 | data from t2 | data from t2 |
+----------+-------­----+--------------+­--------------+-----­---------+

I can figure most of it out with the exception of the ItemCount value. What I have so far is this,

INSERT INTO t1 (GroupCount, ItemCount, Field1, Field2, Field3) SELECT (SELECT Max(GroupCount)+1 From t1), ?????, Field1, Field2, Field3 FROM t2;

The part with the ????? is what I can't figure out.

Any ideas?

Thanks
comment 5 answers | Add comment
ODBC error Andy Cross iPoint systems Ltd 00:44:55
 Hello
I get the following MS prompt box error message displayed after trying
to select a table after a successful connection to the database while I
am in MS FrontPage putting in a Pivot table
[MySQL][ODBC 3.51 Driver][mysqld-3.23.55-nt]You have an error in your
SQL syntax near '"ford_3270_inquiry­"' at line 1 (1064)
I have used this table / ODBC driver successfully else where in MS Excel
/ Access & Crystal Reports
Any ideas?


FRONTPG 630-260 ENTER SQLSetStmtAttrW
SQLHSTMT 04F128A0
SQLINTEGER 18 <SQL_ATTR_PARAM_BIN­D_TYPE>
SQLPOINTER 0x00000000
SQLINTEGER 0

FRONTPG 630-260 EXIT SQLSetStmtAttrW with return code 0
(SQL_SUCCESS)
SQLHSTMT 04F128A0
SQLINTEGER 18 <SQL_ATTR_PARAM_BIN­D_TYPE>
SQLPOINTER 0x00000000
SQLINTEGER 0

FRONTPG 630-260 ENTER SQLSetStmtAttrW
SQLHSTMT 04F128A0
SQLINTEGER 17 <SQL_ATTR_PARAM_BIN­D_OFFSET_PTR>
SQLPOINTER 0012EFC8
SQLINTEGER 0

FRONTPG 630-260 EXIT SQLSetStmtAttrW with return code 0
(SQL_SUCCESS)
SQLHSTMT 04F128A0
SQLINTEGER 17 <SQL_ATTR_PARAM_BIN­D_OFFSET_PTR>
SQLPOINTER 0012EFC8
SQLINTEGER 0

FRONTPG 630-260 ENTER SQLSetStmtAttrW
SQLHSTMT 04F128A0
SQLINTEGER 17 <SQL_ATTR_PARAM_BIN­D_OFFSET_PTR>
SQLPOINTER 00000000
SQLINTEGER 0

FRONTPG 630-260 EXIT SQLSetStmtAttrW with return code 0
(SQL_SUCCESS)
SQLHSTMT 04F128A0
SQLINTEGER 17 <SQL_ATTR_PARAM_BIN­D_OFFSET_PTR>
SQLPOINTER 00000000
SQLINTEGER 0

FRONTPG 630-260 ENTER SQLGetStmtAttrW
SQLHSTMT 04F128A0
SQLINTEGER 10013 <unknown>
SQLPOINTER [Unknown attribute 10013]
SQLINTEGER 0
SQLINTEGER * 0x00000000

FRONTPG 630-260 EXIT SQLGetStmtAttrW with return code 0
(SQL_SUCCESS)
SQLHSTMT 04F128A0
SQLINTEGER 10013 <unknown>
SQLPOINTER [Unknown attribute 10013]
SQLINTEGER 0
SQLINTEGER * 0x00000000

FRONTPG 630-260 ENTER SQLGetStmtAttrW
SQLHSTMT 04F128A0
SQLINTEGER 10011 <unknown>
SQLPOINTER [Unknown attribute 10011]
SQLINTEGER 0
SQLINTEGER * 0x00000000

FRONTPG 630-260 EXIT SQLGetStmtAttrW with return code 0
(SQL_SUCCESS)
SQLHSTMT 04F128A0
SQLINTEGER 10011 <unknown>
SQLPOINTER [Unknown attribute 10011]
SQLINTEGER 0
SQLINTEGER * 0x00000000

FRONTPG 630-260 ENTER SQLSetDescFieldW
SQLHDESC 04F12A04
SQLSMALLINT 1
SQLSMALLINT 1004 <SQL_DESC_OCTET_LEN­GTH_PTR>
SQLPOINTER 0012EFC8
SQLINTEGER 0

FRONTPG 630-260 ENTER SQLSetDescField
SQLHDESC 04F12A04
SQLSMALLINT 1
SQLSMALLINT 1004 <SQL_DESC_OCTET_LEN­GTH_PTR>
SQLPOINTER 0012EFC8
SQLINTEGER 0

FRONTPG 630-260 EXIT SQLSetDescField with return code -1
(SQL_ERROR)
SQLHDESC 04F12A04
SQLSMALLINT 1
SQLSMALLINT 1004 <SQL_DESC_OCTET_LEN­GTH_PTR>
SQLPOINTER 0012EFC8
SQLINTEGER 0

DIAG [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
this function (0)

FRONTPG 630-260 EXIT SQLSetDescFieldW with return code -1
(SQL_ERROR)
SQLHDESC 04F12A04
SQLSMALLINT 1
SQLSMALLINT 1004 <SQL_DESC_OCTET_LEN­GTH_PTR>
SQLPOINTER 0012EFC8
SQLINTEGER 0

DIAG [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
this function (0)

FRONTPG 630-260 ENTER SQLSetStmtAttrW
SQLHSTMT 04F128A0
SQLINTEGER 0 <SQL_ATTR_QUERY_TIM­EOUT>
SQLPOINTER 0x0000001E
SQLINTEGER -6

FRONTPG 630-260 EXIT SQLSetStmtAttrW with return code 0
(SQL_SUCCESS)
SQLHSTMT 04F128A0
SQLINTEGER 0 <SQL_ATTR_QUERY_TIM­EOUT>
SQLPOINTER 0x0000001E (BADMEM)
SQLINTEGER -6

FRONTPG 630-260 ENTER SQLFreeStmt
HSTMT 04F128A0
UWORD 3 <SQL_RESET_PARAMS>

FRONTPG 630-260 EXIT SQLFreeStmt with return code 0
(SQL_SUCCESS)
HSTMT 04F128A0
UWORD 3 <SQL_RESET_PARAMS>

FRONTPG 630-260 ENTER SQLPrepareW
HSTMT 04F128A0
WCHAR * 0x04CFB8A0 [ 33] "SELECT * FROM
"ford_3270_inquiry"­"
SDWORD 33

FRONTPG 630-260 EXIT SQLPrepareW with return code 0
(SQL_SUCCESS)
HSTMT 04F128A0
WCHAR * 0x04CFB8A0 [ 33] "SELECT * FROM
"ford_3270_inquiry"­"
SDWORD 33

FRONTPG 630-260 ENTER SQLNumResultCols
HSTMT 04F128A0
SWORD * 0x0012F044

FRONTPG 630-260 EXIT SQLNumResultCols with return code -1
(SQL_ERROR)
HSTMT 04F128A0
SWORD * 0x0012F044

DIAG [37000] [MySQL][ODBC 3.51 Driver][mysqld-3.23.55-nt]You have an
error in your SQL syntax near '"ford_3270_inquiry­"' at line 1 (1064)

Regards
Andy Cross


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.­com/myodbc
To unsubscribe: http://lists.mysql.­com/myodbc?unsub=gcd­mo-myodbc@m.gmane.or­g


comment 14 answers | Add comment
Tuesday, 16 January 2007
Assigning Variable to a BIT Field Jesse 23:55:38
 OK. I don't recall having a problem with this before, but, how do I assign
a variable to a MySQL Bit field? I'm trying to set up a CheckBox that is on
my form, and I've tried variations of the following:

FirstTime.Checked = CBool(RS("FirstTime­"))
FirstTime.Checked = CBool(RS("FirstTime­").ToString)
FirstTime.Checked = RS("FirstTime")
FirstTime.Checked = Convert.ToBoolean(R­S("FirstTime"))

I believe that all of them give the error, "String was not recognized as a
valid Boolean". When I view the field value in SQL Manager 2005 Lite, It
presents a check box for the field value. When I view it through the MySQL
Query Browser, it presents the value as b'1'

Any hints? I'm sure this is a basic issue, but I just can't seem to find a
way to do it.

Thanks,
Jesse


--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


Add comment
update problem Melchior Rabe 22:28:05
 Hi,
I have a strange problem with a VC6 application using MyODBC. I can connect
the database and add/delete records. Updating a record works only in the
first record (the first of the table).
There are no error-messages in the debug window or anything else that could
help.


Thanks for any suggestions

MELLE

PS: is there anywhere a short example how to include MyODBC into a VC
project?

Here is the code I use:
///////////////////­//////
try{
if( !m_pClient->IsOpen(­ ) )
return;
if( !m_pClient->CanUpda­te( ) )
return;
m_pClient->GetClien­t(nId); // get the record
m_pClient->Edit();

// change values

if( !m_pClient->Update(­ ) )
{
AfxMessageBox(_T("R­ecord not updated."));
return;
}
}
catch(...)
{
AfxMessageBox(_T("E­RROR!"));
return;
}




-------------------­--------------------­--------------------­----------
Please check "http://www.mysql.c­om/Manual_chapter/ma­nual_toc.html" before
posting. To request this thread, e-mail myodbc-thread6185@l­ists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@­lists.mysql.com instead.


comment 20 answers | Add comment
Error not showing in mysql-client Rudu 19:58:32
 Hello co-listers,

I'm getting a syntax error through mysql-connector-jav­a-5.0.4 although
the same sql command is executed with no problem by mysql-client.
The syntax error is near:
"DELETE FROM tps WHERE PSEQ NOT IN (SELECT p.PSEQ FROM fadherent p INNER
JOIN flignactiv l ON ..."
If I don't use this kind of DELETE command, everything is going fine
with my app.

I'm using:
MySQL Server version: 5.0.30-Debian_3-log­ Debian etch distribution
mysql-connector-jav­a-5.0.4
java version "1.5.0_10"


Any explanation on this behaviour?
Any workaround?

Thanks
Jean Marc Briand

--
MySQL Java Mailing List
For list archives: http://lists.mysql.­com/java
To unsubscribe: http://lists.mysql.­com/java?unsub=gcdmj­-java@m.gmane.org


Add comment
query taht works on mysql4 but doesn't on mysql5? Guest 19:24:53
 hi to all!

This is query I used before we moved to mysql4 based dedicated server:

SELECT ".$tn.".reg_id, b.*, sh.*
FROM ".$tn.", bill_info as b
LEFT JOIN shipp_info as sh ON (b.bill_id=sh.bill_­id)
WHERE b.reg_id = ".$tn.".reg_id
AND b.table_name = '".$tn."'
AND ".$tn.".registratio­n_status = '".$_SESSION['order_status']."'
ORDER BY ".$tn.".reg_id DESC

($tn is name for selected table)

Now, after I moved to mysql5 based server I'm getting error:
ERROR: Unknown column 'b.bill_id' in on clause
?!?!?

CREATE TABLE `bill_info` (
`bill_id` int(10) unsigned NOT NULL auto_increment,
`ref_no` varchar(14) default NULL,
`reg_id` int(5) unsigned default NULL,
`cc_id` int(5) unsigned default NULL,
`table_name` varchar(50) NOT NULL default '',
`bill_name` varchar(100) NOT NULL default '',
`bill_address_1` varchar(100) NOT NULL default '',
`bill_address_2` varchar(50) default NULL,
`bill_city` varchar(50) NOT NULL default '',
`bill_state` char(2) NOT NULL default '',
`bill_zip` int(5) unsigned NOT NULL default '0',
`bill_phone` varchar(20) default NULL,
`bill_email` varchar(50) NOT NULL default '',
`shipg_eq_bill` int(1) unsigned default NULL,
`bill_status` varchar(25) default NULL,
`CC_alerted` int(1) default '0',
UNIQUE KEY `bill_id` (`bill_id`),
UNIQUE KEY `ref_no` (`ref_no`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=132 ;


CREATE TABLE `shipp_info` (
`ship_id` int(10) unsigned NOT NULL auto_increment,
`bill_id` int(5) unsigned default NULL,
`ship_name` varchar(100) NOT NULL default '',
`ship_address_1` varchar(100) NOT NULL default '',
`ship_address_2` varchar(50) default NULL,
`ship_city` varchar(50) NOT NULL default '',
`ship_state` char(2) NOT NULL default '',
`ship_zip` int(5) unsigned NOT NULL default '0',
`ship_phone` varchar(20) default NULL,
`ship_email` varchar(50) NOT NULL default '',
UNIQUE KEY `ship_id` (`ship_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;


Thanks for any help!

-afan

--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


comment 5 answers | Add comment
making graphs with MySQL data C.R.Vegelin 18:29:44
 Dear List,

I have a MySQL database (V5.0.x) and I need to make graphs.
Does anyone know about good utilities to make graphs ?
I would appreciate your expertise or links.

TIA, Cor
comment 6 answers | Add comment
MyISAM issues for UTF-8? Dotan Cohen 11:37:15
 I'm storing Hebrew text in a MySQL database as utf-8. I recently saw a
referece to MySQL utf-8 implementations that warned that if one stores
utf-8 text, he must use the problematic MyISAM engine. So, must I use
this engine? How do I check which engine I'm using? I've never set
anything, and my database so far runs fine. Thanks in advance for any
insights.

Note that I add this code after every database connection (I use php):
mysql_query("SET character_set_clien­t=utf8");
mysql_query("SET character_set_conne­ction=utf8");
mysql_query("SET character_set_datab­ase=utf8");
mysql_query("SET character_set_resul­ts=utf8");
mysql_query("SET character_set_serve­r=utf8");

Dotan Cohen

http://what-is-what­.com/what_is/compute­r.html
http://lyricslist.c­om/lyrics/artist_alb­ums/255/hill_faith.h­tml

--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


comment 4 answer | Add comment
Question in ORACLE Prem 07:48:55
 Hello All,

I have a question in ORACLE indexing.... What is the difference between B-Tree index and Bitmap index?

Thanks in Advance,
Prem
comment 1 answer | Add comment
Fw: Re: MySQL++ and Boost Chris Frey 06:15:56
 Forwarded to the list by request,
- Chris


----- Forwarded message from Jonathan Wakely <jonathan.wakely@gm­ail.com> -----

Date: Fri, 12 Jan 2007 20:51:16 +0000
From: "Jonathan Wakely" <jonathan.wakely@gm­ail.com>
To: "Chris Frey" <cdfrey@foursquare.­net>
Subject: Re: MySQL++ and Boost
Cc: plusplus@lists.mysq­l.com
In-Reply-To: <20070112203412.GA3­699@foursquare.net>

Hi Chris,

My mails don't seem to be getting to the list so feel free to forward
this, or reply to the list, or whatever.


On 12/01/07, Chris Frey <cdfrey@foursquare.­net> wrote:>
I'm partly surprised at the amount of pleading against Boost, but on the>other hand, it sounds a lot like the pleading against C++ itself, so>not too surprised. :-)­

And it's mostly misguided - as has finally been said you can take the
parts you want and bundle them with mysql++ - noone would ever need to
download, configure and build boost themselves.
I think one of the roadblocks Boost has is its build system. Yes, once>you've figured it out once, you can script it and do it repeatedly,>but that initial barrier is a hard one to ignore, and lasts a while.>
To get back on topic, a lot of Boost is just header files. If they were>copied verbatim into mysql++, that would be the easiest solution I think.>Verbatim copying should avoid any conflicts between the two libraries>for people who do use Boost and mysql++ together.

That also avoids having to use boost's annoying build system.
But as the interest in Boost is for the threads, copying Boost threads >support>into mysql++ means copying library functionality. If I understand the>issues correctly, this means binary bloat for apps that use both libraries.

I said in an earlier mail has disappeared that it would be nice to
have a config option saying whether to use the bundled parts of boost,
or a pre-installed one on the system. That's a nice-to-have feature,
not essential, but shouldn't be too hard (depending on the config
setting you either use ./boost which is part of the mysql++ source
tree, or use some user-specified paths)

regards,

jon

----- End forwarded message -----

--
MySQL++ Mailing List
For list archives: http://lists.mysql.­com/plusplus
To unsubscribe: http://lists.mysql.­com/plusplus?unsub=g­cdmc-plusplus@m.gman­e.org


Add comment
mysqldump and batch processing on windows (start /wait /B ....) Frank Fischer 03:46:15
 Hi all

i have a little problem with mysqldump under Windows 2k3.

I have four instances of mysql running which i would like to backup, one
after the other. That means, i would have to start mysqldump app with the
windows "START" command with the "/wait" option to make sure the second dump
just starts after the first dump has finished and so on (at least i see no
other way to do this). Otherwise all dumps would run at the same time.

Funny thing is - that only works when calling mysqldump as follows:

start /wait /low d:\mysql-slave\bin\­mysqldump --host=127.0.0.1 --port=3306
--user=xxxx --password=xxxx --all-databases --verbose --compress >
backupfile3306.sql
start /wait /low d:\mysql-slave\bin\­mysqldump --host=127.0.0.1 --port=3307
--user=xxxx --password=xxxx --all-databases --verbose --compress >
backupfile3307.sql
start /wait /low d:\mysql-slave\bin\­mysqldump --host=127.0.0.1 --port=3308
--user=xxxx --password=xxxx --all-databases --verbose --compress >
backupfile3308.sql
start /wait /low d:\mysql-slave\bin\­mysqldump --host=127.0.0.1 --port=3309
--user=xxxx --password=xxxx --all-databases --verbose --compress >
backupfile3309.sql


Now - like this each mysqldump runs after another, but, unfortunally no data
is written to the target files. What i see, is that a new console window is
opened and the backup data is written to this window instead of to the file.


So i changed the batch commands a little bit. I just added "/B" to the start
command:

start /wait /low /B d:\mysql-slave\bin\­mysqldump --host=127.0.0.1
--port=3306 --user=xxxx --password=xxxx --all-databases --verbose --compress> backupfile3306.sql
start /wait /low /B d:\mysql-slave\bin\­mysqldump --host=127.0.0.1
--port=3307 --user=xxxx --password=xxxx --all-databases --verbose --compress> backupfile3307.sql
start /wait /low /B d:\mysql-slave\bin\­mysqldump --host=127.0.0.1
--port=3308 --user=xxxx --password=xxxx --all-databases --verbose --compress> backupfile3308.sql
start /wait /low /B d:\mysql-slave\bin\­mysqldump --host=127.0.0.1
--port=3309 --user=xxxx --password=xxxx --all-databases --verbose --compress> backupfile3309.sql


Now again a funny behaviour - this time there are no new console windows
opened and the backup data is written to the target files, but now instead
of waiting until a mysqldump process has ended before starting the next, the
batch just starts one after another so all are running at the same time.

Working with CALL instead of START or even with CALL in combination with
START doesn't change anything in this behaviour.

Does anyone has an idea what i'm doing wrong? Any other way to do what i
would like (i have to add that i also need to control process priority)?

Thanks a lot for your help
Frank


comment 1 answer | Add comment
Re: Extracting data from MySQL into Access Du an Pavlica 00:37:35
 Shortly, if you have MySQL ODBC driver installed, you can create ODBC
data source and connect to this data source from Access, Excel, Open
Office, ....

Dusan

Dewald Troskie napsal(a):> Hi,>
I know this is a weird request, but I need a tool / tutorial on> extracting data from InnoDB tables in MySQL 5.x and putting the data> into Microsoft Access. COuld anybody advise me where to do this?>
Thanks,>
Dewald Troskie>

--
MySQL General Mailing List
For list archives: http://lists.mysql.­com/mysql
To unsubscribe: http://lists.mysql.­com/mysql?unsub=gcdm­g-mysql@m.gmane.org


comment 2 answer | Add comment
Monday, 15 January 2007
Index and Order By Kelvin Wu 22:13:44
 I am looking for help and suggestion.

Mysql Ver 12.18 Distrib 4.0.12, for pc-linux (i686)


The table structure:

mysql> desc article;
+----------------+-­-------------+------­+-----+---------+---­-------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-­-------------+------­+-----+---------+---­-------------+
| id | int(11) | | PRI | NULL | auto_increment |
| title | varchar(200) | | | | |
| timestamp | int(11) | | | 0 | |
| active | tinyint(4) | | MUL | 1 | |
| source | int(11) | | | 1 | |
| category | int(11) | | | 0 | |
+----------------+-­-------------+------­+-----+---------+---­-------------+
I created multiple parts of Index for this table:
mysql> create index bynone on article (active, timestamp, id);
mysql> create index bysource on article (active, source, timestamp, id);
mysql> create index bycategory on article (active, source, category,
timestamp, id);

There are around 130000 rows in this table, indexes are created on the
existing rows and records keep growing.

And here are the questions:

Q1: the query is supposed to use index bynone but ...
mysql> explain select * from article where active = 1 order by timestamp
desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+----------+-­--------+-------+---­-----+--------------­---------------+
| table | type | possible_keys | key | key_len | ref |
rows | Extra |
+---------+------+-­--------------------­-------+----------+-­--------+-------+---­-----+--------------­---------------+
| article | ref | bynone,bysource,byc­ategory | bysource | 1 | const |
129805 | Using where; Using filesort |
+---------+------+-­--------------------­-------+----------+-­--------+-------+---­-----+--------------­---------------+
wrong index key

mysql> explain select * from article where active = 1 and timestamp > 0
order by timestamp desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+--------+---­------+-------+-----­--+-------------+
| table | type | possible_keys | key | key_len | ref |
rows | Extra |
+---------+------+-­--------------------­-------+--------+---­------+-------+-----­--+-------------+
| article | ref | bynone,bysource,byc­ategory | bynone | 1 | const |
64448 | Using where |
+---------+------+-­--------------------­-------+--------+---­------+-------+-----­--+-------------+
2nd query is fater than the first one, though i dont quite understand why
timestamp > 0 must be used here, and why rows are different?

mysql> select count(*) from article where active = 1 and timestamp > 0;
+----------+
| count(*) |
+----------+
| 129805 |
+----------+
Q2: the query is supposed to use index bysource but ...
mysql> explain select * from article where active = 1 and source = 1 and
timestamp > 0 order by timestamp desc, id desc limit 0, 20;
+---------+-------+­--------------------­--------+----------+­---------+------+---­----+-------------+
| table | type | possible_keys | key | key_len | ref |
rows | Extra |
+---------+-------+­--------------------­--------+----------+­---------+------+---­----+-------------+
| article | range | bynone,bysource,byc­ategory | bysource | 9 | NULL |
75925 | Using where |
+---------+-------+­--------------------­--------+----------+­---------+------+---­----+-------------+
mysql> explain select * from article where active = 1 and source = 2 and
timestamp > 0 order by timestamp desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+------------­+---------+---------­----+------+--------­--------------------­-+
| table | type | possible_keys | key | key_len |
ref | rows | Extra |
+---------+------+-­--------------------­-------+------------­+---------+---------­----+------+--------­--------------------­-+
| article | ref | bynone,bysource,byc­ategory | bycategory | 5 |
const,const | 1110 | Using where; Using filesort |
+---------+------+-­--------------------­-------+------------­+---------+---------­----+------+--------­--------------------­-+
mysql picked up wrong index key

mysql> explain select * from article where active = 1 and source = 3 and
timestamp > 0 order by timestamp desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+----------+-­--------+-----------­--+------+----------­---+
| table | type | possible_keys | key | key_len |
ref | rows | Extra |
+---------+------+-­--------------------­-------+----------+-­--------+-----------­--+------+----------­---+
| article | ref | bynone,bysource,byc­ategory | bysource | 5 |
const,const | 6445 | Using where |
+---------+------+-­--------------------­-------+----------+-­--------+-----------­--+------+----------­---+
mysql> explain select * from article where active = 1 and source = 12 and
timestamp > 0 order by timestamp desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+------------­+---------+---------­----+------+--------­--------------------­-+
| table | type | possible_keys | key | key_len |
ref | rows | Extra |
+---------+------+-­--------------------­-------+------------­+---------+---------­----+------+--------­--------------------­-+
| article | ref | bynone,bysource,byc­ategory | bycategory | 5 |
const,const | 6108 | Using where; Using filesort |
+---------+------+-­--------------------­-------+------------­+---------+---------­----+------+--------­--------------------­-+
mysql used wrong index key

Removing timestamp > 0, some work some wont.
mysql> explain select * from article where active = 1 and source = 12 order
by timestamp desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+----------+-­--------+-----------­--+------+----------­---+
| table | type | possible_keys | key | key_len |
ref | rows | Extra |
+---------+------+-­--------------------­-------+----------+-­--------+-----------­--+------+----------­---+
| article | ref | bynone,bysource,byc­ategory | bysource | 5 |
const,const | 5270 | Using where |
+---------+------+-­--------------------­-------+----------+-­--------+-----------­--+------+----------­---+
Using of "timestamp > 0" caused using different index on different source =
xxx... why is like that so?

Q3: the query is supposed to use index bycategory and it seems work fine so
far...
mysql> explain select * from article where active = 1 and source = 1 and
category = 53 order by timestamp desc, id desc limit 0, 20;
+---------+------+-­--------------------­-------+------------­+---------+---------­----------+------+--­-----------+
| table | type | possible_keys | key | key_len |
ref | rows | Extra |
+---------+------+-­--------------------­-------+------------­+---------+---------­----------+------+--­-----------+
| article | ref | bynone,bysource,byc­ategory | bycategory | 9 |
const,const,const | 9619 | Using where |
+---------+------+-­--------------------­-------+------------­+---------+---------­----------+------+--­-----------+
Any idea?

Thanks a lot!
comment 3 answer | Add comment
Reading large(600k-1000k) number of records. Nurullah Akkaya 19:35:45
 i have the following table in my database i am trying select postings
based on wordId whole table has around 200 million records.

DROP TABLE IF EXISTS `postingList`;
CREATE TABLE `postingList` (
`wordId` MEDIUMINT UNSIGNED NOT NULL,
`docId` INT UNSIGNED NOT NULL,
`docPosition` smallint UNSIGNED NOT NULL,
`bold` tinyint unsigned,
`header` tinyint unsigned,
`url` tinyint unsigned,
`anchorId` MEDIUMINT UNSIGNED,
`upperCase` tinyint unsigned,
INDEX (`wordId`),
INDEX (`docId`),
INDEX (`anchorId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='list postings';

i read these in to my application using result set streaming since i
don't know how many i'll read i do not want to run out of memory i
have one thread reading results from database and two threds
processing the results read.

i can not spread reads across disks or use mysql cluster. what i was
wondering is if i squeeze those 3 tinyints into int and read just
that will it improve performance i only use mysql to store data all
calculations are done in memory are all the postings are read.

i have increased the key_buffer size but this problem occurs during
the first read so key_buffer wasn't very helpful.



Nurullah Akkaya
nurullah_akkaya@yah­oo.com

Blooby.com
Tel: +1 (256) 270 4091



comment 1 answer | Add comment
MS Access - Windows ODBC with remote connection to Linux Database Khalim Harris 18:58:27
 Hi List. Please help... I've read up on this for days and days and I
feel like I'm missing something because other people have had so much
more successs than I have.

My Request is this:

Please describe to me any steps that I may be missing in my
installation / configuration / setup of MyODBC, MS Access 2003, ODBC DSN
in order to make the linking of my databases more successful.

I need to either link to or export some MS Access2003 Tables to a Linux
MySQL database. I've tried several times and in many different ways to
do so using MyODBC 3.51 and 5.0. connecting to a MySQL 5.0 database
(Currently running on my desktop CentOS4.3 box).

Using MyODBC 3.51 crashes Access to where it tells me it must shut down
and restart. This happens about 4 seconds after choosing the MyODBC 3.51
Resource to connect to.

Using MyODBC 5.0 works to a limited extent. Only small tables can be
linked to (less than 5 columns) and even then only with numeric and
varchar definitions... and no keys. I've managed to link 1 table with 9
columns... but that table was empty.


Again, My Request is:

Please describe to me any steps that I may be missing in my
installation / configuration / setup of MyODBC, MS Access 2003, ODBC DSN
in order to make the linking of my databases more successful.

Thank you all for any help,
Khalim


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.­com/myodbc
To unsubscribe: http://lists.mysql.­com/myodbc?unsub=gcd­mo-myodbc@m.gmane.or­g


comment 2 answer | Add comment
error when reading Ib Solution 03:31:50
 hai member,

i have an error with this message :
061210 19:47:28 [ERROR] Got error 134 when reading table
'./hospitality/lock­ertrans'

070111 20:19:45 [ERROR] Got error 127 when reading table
'./hospitality/lock­ertrans'

when i try repairing the data with mySQL GUI, that error that does not exist.

how to prevent that error to be exist ?


using
Mysql 5.0.22




--
TIA,

Andy Susanto,S.Kom
===================­====================­===============

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.­com/win32
To unsubscribe: http://lists.mysql.­com/win32?unsub=gcdm­w-win32@m.gmane.org


comment 1 answer | Add comment

Add new topic:

How:  Register )
 
Login:   Password:   
Comments by: Premoderation:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > MySQL database developmentGo to page: « previous | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | next »

see also:
[magnolia-dev] [JIRA] Assigned…
[magnolia-dev] [JIRA] Resolved…
[magnolia-dev] [JIRA] Updated…
pass tests:
What is Your Temperament?
Winx.Stella or Blymm or Flora
see also:

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .