help with index on table
Hi I tried to create an index on one of my tables. After creating this index, the queries return an empty set, instead of the expected result. I have a table user looks like this: id - int(11) username - varchar(250) address - varchar(250) more columns... After creating an index: CREATE INDEX my_index on user (username(10)); I tried to run: SELECT * FROM user WHERE username like 'homer'; I get an empty set, however when I run the same query without the index - I get results. What am I doing wrong? Thanks.
Using index returns an empty esult set
Hi I tried to create an index on one of my tables. After creating this index, the queries return an empty set, instead of the expected result. I have a table user looks like this: id - int(11) username - varchar(250) address - varchar(250) more columns... After creating an index: CREATE INDEX my_index on user (username(10)); I tried to run: SELECT * FROM user WHERE username like 'homer'; I get an empty set, however when I run the same query without the index - I get results. What am I doing wrong? Thanks.
Query multiple tables
Hi, How do I query multiple tables. For example I have TableName Accommodation Field1 AccommodationID Field2 AccommodationName I also have TableName Attractions Field1AttractionID Field2 AttractionName Field3 AttractionDescription Then I have TableName AccommodationAttractions Field1AccommodationAttractions Field2 AccommodationID Field3 AttractionID What query do I need to get AccommodationName and what attractions it has from AccommodationAttractions Thanks Neil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MS Access gives error no. -7776.
Dear Friends, I have connected MS Access to MySQL 5.0.17 with MyODBC 3.51.12 with MS Jet SP 8. It is giving error -7776 (There is no message for this error) while jumping from a form to a subform having two different tables for these tow forms as recordsource. Can any one please help me. It's urgent. Thanks in advance CPK -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MS Access gives error no. -7776.
Hi CPK, I suppose you've looked at the manual in: http://dev.mysql.com/doc/refman/5.0/en/myodbc-examples.html It you still have problems, try just the linked table, without forms. If you can view the linked MySQL tables in MS Access, then the problem has to do with the forms, and not with the connection. HTH, Cor - Original Message - From: C K [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Sunday, July 02, 2006 2:29 PM Subject: MS Access gives error no. -7776. Dear Friends, I have connected MS Access to MySQL 5.0.17 with MyODBC 3.51.12 with MS Jet SP 8. It is giving error -7776 (There is no message for this error) while jumping from a form to a subform having two different tables for these tow forms as recordsource. Can any one please help me. It's urgent. Thanks in advance CPK -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Query multiple tables
What query do I need to get AccommodationName and what attractions it has from AccommodationAttractions SELECT ac.accommodationname, at.attractionname aa.AccomodationAttraction FROM accommodationattractions AS aa INNER JOIN accommodations AS ac USING (accommodationid) INNER JOIN attractions AS at USING (attractionid); PB - Neil Tompkins wrote: Hi, How do I query multiple tables. For example I have TableName Accommodation Field1 AccommodationID Field2 AccommodationName I also have TableName Attractions Field1AttractionID Field2 AttractionName Field3 AttractionDescription Then I have TableName AccommodationAttractions Field1AccommodationAttractions Field2 AccommodationID Field3 AttractionID What query do I need to get AccommodationName and what attractions it has from AccommodationAttractions Thanks Neil -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problems with: MySQL 5.0.21 - 64bit
Spoken too soon... Yesterday MySQL died again... there is nothing in the log files... (be it mysqld.log, .err, or /var/log/messages). The hosting provider is running an application called 'big-brother' and a lot of sef-faults appear in the logs from this. I don't know if thins is the cause... if this application is faulting mysql also... The behaviour: the whole machine freezes... all that can be done is to hit the RESET button on the machine ! Friday we downgraded from 5.0 to 4.1. At first we compiled the MySQL server ourselvs... next we deleted it and installed a RPM version... none worked... It appears we hit bug 15815... (http://bugs.mysql.com/bug.php?id=15815)... So be aware with innodb_thread_concurency on 64bit machines... Below are some values as an orientation... for innodb_thread_concurency value per machine workload (at arround 600 simultaneous connections... all used): innodb_thread_concurency / CPU-workload 8 / 90% 4 / 75 - 85% 3 / 60 - 70% 2 / 25% So set it lower... lower... lower... when I left the office friday my colleagues were still working at this... I'll keep you all updated ! -- Gabriel PREDA Senior Web Developer -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problems with: MySQL 5.0.21 - 64bit
Hi Gabriel, Yesterday MySQL died again... there is nothing in the log files... (be it mysqld.log, .err, or /var/log/messages). The hosting provider is running an application called 'big-brother' and a lot of sef-faults appear in the logs from this. I don't know if thins is the cause... if this application is faulting mysql also... The behaviour: the whole machine freezes... all that can be done is to hit the RESET button on the machine ! If the whole machine freezes, this sounds like bad memory, bad cpu, or similar, rather than a MySQL problem. Regardless of how poorly an application could be written, it should not be possible for it to freeze the machine. Regards, Jeremy -- high performance mysql consulting www.provenscaling.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
PostgreSQL or mySQL
Hello List: I hope my question does not start war of the posts. This question is genuine. Please answer objectively: I am test setting a Master Server (MS) with CentOS 4.3, freeRADIUS, DNS, Apache, (mySQL PostgreeSQL), PHP, Postfix, etc. This Master Server will have all the software I we need for our operation. We will copy MS to each server and setup a load balancing servers. I have very little knowledge of either PostgreeSQL or mySQL. Please advise me as to which of these two software package to use? I need some specific examples as to superiority of one package over the other. I prefer using the package which has a goof GUI database design. Please help. I am posting this message to both lists. I am specifically interested in opinion of system analysts who have used both of these packages. Thanks. Kirti
Re: howto set mysql to readonly
Hi Jehan, OK so it seems to be a bad idea ... I was expecting that I missed a magic command like set readonly on all databases ... I think you did: SET GLOBAL read_only=1; This will keep all non-SUPER and non-replication users from writing to the database. Regards, Jeremy -- high performance mysql consulting www.provenscaling.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MS Access gives error no. -7776.
C K wrote: Dear Friends, I have connected MS Access to MySQL 5.0.17 with MyODBC 3.51.12 with MS Jet SP 8. It is giving error -7776 (There is no message for this error) while jumping from a form to a subform having two different tables for these tow forms as recordsource. Can any one please help me. It's urgent. If it's urgent, you should consider posting more information, or you will loose time while people ask you to send more information, for example: - output of 'show create table xx' for each table - version of Access, including service packs - version of Windows -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Works in SQL Manager, but not PHP?
MySQL version 5.0.16 Windows XP PHP 5. I have this query that when I run it in SQL Manager 2005, it runs beautifully, but when I stick the same query in Dreamweaver using PHP - MySQL I get an error. I did some research and most roads lead to version compatibility. Okay, that's fine, but I'm not sure how to fix it? Both Dreamweaver and SQL manager are being run on the same box so I don't get the version difference?? It's obviously the same version of MySQL. Can someone point me to a good PHP mailing list? My apologies if this is not the right list to ask this question, but I'm sure some people here use PHP also. From Dreamweaver 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 '; CREATE TEMPORARY TABLE t ( module_id INT, module_name VARCHAR(32), ' at line 1 Here is the query: DROP TABLE IF EXISTS t; CREATE TEMPORARY TABLE t ( module_id INT, module_name VARCHAR(32), email VARCHAR(60), time_zone TINYINT (4), date_time DATETIME, score INT ); INSERT INTO t SELECT completed_modules.module_id, modules.module_name, students.email, students.time_zone, completed_modules.date_time, max(completed_modules.score) AS score FROM students INNER JOIN completed_modules ON (students.email = completed_modules.email) INNER JOIN modules ON (completed_modules.module_id = modules.module_id) GROUP BY module_id, email; SELECT module_id, module_name, email, score, DATE_FORMAT(DATE_SUB(date_time, INTERVAL time_zone HOUR),'%e %M %Y') as 'date_time' FROM t WHERE email = '[EMAIL PROTECTED]' ORDER BY date_time DESC; Thanks for any help on this! -Brian Menke
Re: Works in SQL Manager, but not PHP?
Brian Menke wrote: MySQL version 5.0.16 Windows XP PHP 5. I have this query that when I run it in SQL Manager 2005, it runs beautifully, but when I stick the same query in Dreamweaver using PHP - MySQL I get an error. I did some research and most roads lead to version compatibility. Okay, that's fine, but I'm not sure how to fix it? Both Dreamweaver and SQL manager are being run on the same box so I don't get the version difference?? It's obviously the same version of MySQL. snipped You're sending multiple commands in the 1 query. Break it up into separate queries and execute them 1 after the other. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]