Why Does This Work In PhpMyAdmin But Not In PHP?
This is driving me absolutely crazy. I am using the following query which works fine in phpMyAdmin in the SQL section
SELECT date, amount, description FROM invoices WHERE unique_key = 48781048
when I enter it like this in PHP it comes up with the error below
$query = "SELECT date, amount, description FROM invoices WHERE unique_key = 48781048";
$result = mysql_query($query) or die (mysql_error());
Unknown column 'unique_key' in 'where clause'
I've even tried using the PHP code that phpMyAdmin generates and that doesn't even work.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Getting Phpmyadmin To Work From Executable?
i was using mysqlcc to manipulate the database, but now it's no longer available. phpmyadmin was recommended so i went looking for it and found tar and .gz files...is there an executable install option for phpmyadmin?
Phpmyadmin To Work With Mysql. I Get No Privileges
I have the Fedora version from the Wiley book on Linux. I am having problems with getting phpmyadmin to work with mysql. I get "No Privileges" when I try to create a database. All I see is a test database. I don't see a "mysql" database. I think something did not get installed correctly in the initial setup. Every time I try to grant privileges, change passwords, I get access denied. I am logged in as root. Can someone provide instructions on initial setup of mysql or point me to a script I can run that will set up the mysql database for me?
How Does Sql Work Exactly?
Well what exactly does sql do when you create a table for like a login (user) What does the tables and stuff do. Do they just create like a library to store that users information so they can log back in to site or w/e....
Bug Work
I've got this bug http://bugs.mysql.com/bug.php?id=27861. I know they've made a fix and it's going to come out in the next version but is there any way I can fix this myself?
SET NULL Doesn't Work
I have this table: MySQL CREATE TABLE `users` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `login` VARCHAR(20) NOT NULL, `password` VARCHAR(20) NOT NULL, `name` VARCHAR(30) NOT NULL, `email` VARCHAR(30) NOT NULL, `icq` INT(9) UNSIGNED DEFAULT NULL, `personal_stream_id` INT(11) NOT NULL, `TIME` DATETIME NOT NULL, `url_name` VARCHAR(30) DEFAULT NULL, `avatar` VARCHAR(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), UNIQUE KEY `login` (`login`), UNIQUE KEY `email` (`email`), UNIQUE KEY `icq` (`icq`), CONSTRAINT `users_fk` FOREIGN KEY (`id`) REFERENCES `photos` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=INNODB DEFAULT CHARSET=latin1; The constraint is linking this table: MySQL CREATE TABLE `photos` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(20) NOT NULL, `user_id` INT(11) DEFAULT NULL, `streams_id` INT(11) NOT NULL, `description` TEXT, `hardware_id` INT(11) DEFAULT NULL, `ratings_id` INT(11) DEFAULT NULL, `thread_id` INT(11) DEFAULT NULL, `url_name` VARCHAR(20) DEFAULT NULL, `views` INT(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), KEY `ratings_id` (`ratings_id`), KEY `user_id` (`user_id`), KEY `streams_id` (`streams_id`) ) ENGINE=INNODB DEFAULT CHARSET=latin1; It works, but as you can see, the constraint ondelete action is set to CASCADE, which is not good - it is bad to delete all photos when the user is deleted, I want the database to set user_id value to NULL using the SET NULL action - PHP frontend should display something like "User deleted" then. But when I try to alter the constraint to SET NULL, EMS SQL Manager I'm using shows a very strange error like "Can't create table '.dfk#sql-8e4_4.frm' (errno: 150)". Similiar error is shown when I try to link unsigned int with not unsigned int.
What Query Would Work For This?
I have two tables: say Yes and No. Yes(ID, YesEmail, EmailOwner); No(ID, NoEmail); Both YesEmail and NoEmail contain email addresses. What query can retrieve all the email addresses in Yes table that are not listed in No table? Thanks in advance.
How Does 'query_buffer_size' Work In 3.23.56
I see a variable named 'query_buffer_size' that value is 0 in mysql server 3.23.56. I didn't find relational materials in reference. so I wander if any one could tell me what is this variable for?
Min Max Does Not Work For Me For Timestamp
I have such a table: id timestamp value person regardless or entering this SELECT id, MIN(timestamp),value FROM table GROUP BY person or this SELECT id, MAX(timestamp),value FROM table GROUP BY person The timestamp value may be properly pulled, yet, the value field is always the same. Meaning, not the value associated wuth the MIN or MAX timestamp value is shown, but the very first for that person. How is that possible?
Cannot Get 3 Where Statement To Work
I am having a problem with MySQL 5. I cannot get 3 where statements to work with my database. Any two of the three work fine and return records as they are supposed to but when I add a third clause (all clauses are AND) I get absolutely no records at all and no error message. I don't understand what could be causing this and can use any help offered. SELECT this, that, otherthing FROM myTable WHERE something = "this" AND somethingelse = "that" AND yetsomethingelse > 0 ORDER BY RAND() LIMIT 3;
LOAD_FILE Doesn't Work
I try to load a file into the SQL DB, using load_file() function. But this doesn't work. Database definition: Field Type Attributes Null Default ID int(8) No server_id int(4) Yes NULL date date Yes NULL inventtext longblob BINARY Yes NULL SQLcommand: mysql> insert into inventory values('', '858', '2008-01-16', LOAD_FILE("/import/tv.20080116")); The file has the following security settings: -rwxrwxrwx tv.20080116 (116 KB) When I execute the command I don't get an error, but are filled like this: ID server_id date inventtext 242 858 2008-01-16 [BLOB - NULL]
Getting PHP & MySQL To Work Together
I am trying to get PHP to write into MySQL database. Right now it does not seem that it is doing such, MySQL doesnt appear when I bring up the PHPInfo() page. I have removed semi-colons before the Mysql.dll extension in php.ini, and I have made sure that PHP is in the windows PATH. What else do I need to do to get this stuff running?
Auto_Increment Doesn't Work Any More!
After upgrading from 5.0.11.beta to 5.0.15 on a Windows 32 system, I can't use the auto_increment feature any more; for example, phpMyAdmin gives the following error message: "#1366 - Incorrect integer value: '' for column 'ID' at row 1". Other php clients also (WordPress, MediaWiki...) don't work.
WHERE EXISTS Does Not Work.
SELECT id,name FROM tcesports_groups WHERE EXISTS (SELECT * FROM tcesports_teams WHERE tcesports_teams.gid=tcesports_groups.id); i get this: 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 'EXISTS (SELECT * FROM tcesports_teams WHERE tcesports_teams.gid Strucuture of the both tables: tcesports_teams ------------------- gid smallint(6) img varchar(100) mod mediumint(9) pos smallint(6) tcesports_groups ------------------- id smallint(5) name varchar(100) currently the entries for id or gid are just 2digits long (1-99) so im a bit confused what throws this error. im using mysql 4.0 branch
Logging Doesn't Work
I have WinXP, and MySQL 5.0.18 running as a service. I followed the instructions for setting up general query log file (mysqld --log), and the file was created (Nebo.log), but it does not display any logs. This is all I have after executing a few queries: Nebo.log mysqld, Version: 5.0.18-log. started with: Tcp port: 3306 Unix socket: (null) Time Id Command Argument Can anyone offer any help?
Date() Just Won't Work
I have this line while ($qry = mysql_fetch_array($results)) { // if (strtotime($qry['loginDateTime']) <= (time() + 86400*31)) { $login .= 'Name: '.$qry["FirstName"].' '.$qry["LastName"].' ('.$qry["JoinDate"]?date("d/m/Y", strtotime($qry["JoinDate"])).') '.$qry["Email"].''.$qry["rep_NBR"].' ('.$qry["State"].') '; //} } And when I run it I receive [quoteParse error: parse error, unexpected ';' in e:emailMembersPending.php on line 43[/quote]
Won't Work On Server!
here's the error: DBD::mysql::st execute failed: Table 'garcia22_ccc.offers' doesn't exist at index.pl line 1257. DBD::mysql::st fetchrow_array failed: fetch() without execute() at index.pl line 1266.
Join Doesn't Seem Work
I have some issues with a simple query, but I just can't figure out why the query doesn't return expected results. Here is the situation: I have a table look like this: TRANSACTION(UNIQUE_ID(PK), CUSTOMER_ID, EMP_ID, TRANS_TYPE, TRANS_DATE, POSTED_DATE, AMOUNT_CHARGED, AMOUNT_PAID, TRANS_LOC, TRANS_ID_CHARGE, TRANS_ID_PAYMENT) Some rules for the data in the table: - The TRANS_TYPE indicates if it is a charge or payment(C charge, P for payment). For a payment, there is a unique TRANS_ID_PAYMENT, and for same transaction, the charge record holds same TRANS ID in the TRANS_ID_CHARGE field. - The TRANS_LOC is for location where the charge happened. But for a payment record, this field is null. which means, payment records and charge records can't be linked together through location. - TRANS_DATE is the date the transaction happened. For a payment record, this field is also null. - A charge record and a payment record for same transaction usually have different POSTED_DATE since they are posted most likely on different days. - AMOUNT_PAID could be less than AMOUNT_CHARGED for same transaction since customers can have an installment payment plan. Here is my query: SELECT DISTINCT A.CUSTOMER_ID, A.AMOUNT_PAID FROM TRANSACTION A WHERE A.TRANS_TYPE = 'C' AND A.TRANS_DATE BETWEEN '2007-01-01' AND '2007-09-30 AND A.LOC_ID = 1 UNION ALL SELECT DISTINCT A.CUSTOMER_ID, A.AMOUNT_PAID FROM TRANSACTION A, TRANSACTION B WHERE A.TRANS_TYPE = 'P' AND B.TRANS_TYPE = 'C' AND B.TRANS_DATE BETWEEN '2007-01-01' AND '2007-09-30 AND B.LOC_ID = 1 AND A.CUSTMER_ID = B.CUSTOMER_ID AND A.EMP_ID = B.EMP_ID AND A.TRANS_ID_PAYMENT = B.TRANS_ID_CHARGE The purpose of this query is to pair all the charge and payment records for the same transaction that happened between a certain period of time. But the results show that there are some dangling payment records that are not linked to any charge records.
Sql Statement Doesn't Work
When i was using a previous version of mysql (3.something) this sql statement worked fine. strSQL = "SELECT COUNT(*) as COUNTER FROM prayerrequest where dateexpires <= '" & sDate & "'" sDate equals todays date. But after installing the new version (4.1) of mysql this statement no longer works. I went as far as stepping through all dates and comparing them and it wouldn't work. "1/11/2005" from the database did not equal sDate which was "1/11/2005".. The only way I could get it to work was to use the asp/vb function FormatDateTime on dateexpires and then compare it with sDate. Does mysql not return a different var type? Is there anyway I can convert dateexpires in the above sql statement so I can compare it with sDate?
Index Doesn't Work With < Or >
I've noticed that MYSQL is not using indexes when the operators "<" or ">" are used in the SELECT query; For example: SELECT firstname FROM users WHERE birthyear < 1969 Now, birthyear is of type "int" and is indexed. However the EXPLAIN statement shows that all rows are examined.
Getting Log File To Work
I am putting log = "C:Program FilesMySQLMySQL Server 5.0sql.txt" into my .ini files and mysql wont start. I cant work out the syntax to tell mysql to ouput all the queries to a log file.
Getting MySQL To Work..
I downloaded version 4.1.7, opened the manual, followed the instructions, and installed it. Then, when I opened up the "MySQL Server Instance Config Wizard", I set it all up. I press the "Configure" button, and it runs up the point where it creates the Service. Then, it gives this message"Could not start the service MySQL. Error: 0". I've ran a Google search on the error message, but have found nothing. I'm running Windows XP. If there's any more information you need about my computer setup, go ahead and ask.
Date_add Does Not Work
I'm using mySQL 5.0, with a database of UNIX timestamps. Can someone explain this to me? This query works great: SELECT from_unixtime( 1132277574 ) But this one breaks: SELECT date_add(from_unixtime( 1132277574 ), interval 1 week) Telling me, oh-so-helpfully, that the error is near "'week)'". (It doesn't work when I use "1 weeks" either.)Does the from_unixtime simply not work with the date_add function, or is there some arcanity to this syntax that I'm missing?
Difference Of Work
My provider has passed on version 4.1.7 and the inquiry of the following kind has ceased to work for me: SELECT goods.id, goods.name FROM goods LEFT JOIN category ON goods.id = category.goods AND category.razdel=2 WHERE category.goods IS NULL. Before all worked correctly, on the version 3.x, what could exchange? Where a problem?
Work In MySql
This query works fine in SQL Server, will it work in MySql? SELECT a.total, b.browsertotal, b.browser, (b.browsertotal / a.total) * 100 AS browserpercent FROM (SELECT Count(id) As total FROM MyTable) a, (SELECT count(id) as browsertotal, browser FROM MyTable GROUP BY browser) b I dont have MySQL and I am trying to help someone out.
Mysql_connect Does Not Work
I have searched through the forum and tried the suggestions that have been made for this issue but I am about ready to give up! I have installed Apache 2.0.52, PHP 5.0.3, and MySQL 4.0.23 on Windows XP. I uncommented extension=php_mysql.dll in the php.ini file and copied libmysql.dll into both C:WindowsSystem32 and C:WindowsSystem. My phpinfo.php test works fine so I know PHP and Apache are working together. I do not see any MySQL references on that entire page. From previous posts I know I should. Needless to say, mysql_connect(...) does not work, it gives an undefined function error. I apologize if this should have been posted in the PHP forum instead. If it is a PHP issue, I will repost this there.
Sentence Doesn't Work
I'm using mysql 4.0.21 and Toad to run this query. The message i'm receiving is that there is a Syntax error, where? select a.id_opcion, a.nombre, a.campo, a.visible, b.id_usuario, if(b.ancho is null, 50, b.ancho) as ancho, b.posicion from det_rmen as a left join (select * from rmen_usu where id_usuario = 'generico') as b on (a.id_opcion = b.id_opcion and a.campo = b.campo) where (b.id_usuario='generico') or (b.id_usuario is NULL) order by id_opcion, posicion;
Can't Work Out SELECT And CASE
Before I confuse you with my description, here is what I currently do, and it works in a roundabout way. I removed some unrelated stuff....
Insert Does Not Work But Editor Say That Its Ok!
I connect to a remove mysql host via the free SQLYog successfully. Now, I have the following problem. I have one table called "activeEbayListings". I open the query editor and simple type in the following query: INSERT INTO activeEbayListings (title, subtitle, quantity, current_price, store_category, item_id) VALUES ('test','test', 1, 1, 2, 'someID'); The editor says to me that the query was successfully and the 1 row was affected (inserted...). It says the following: (1 row(s) affected) (0 ms taken) OK, then I refresh the whole database in SQLYog and view the rows...but I simply cannot find the data that was previously inserted. What is wrong here?
How UNION Is Supposed To Work?
Hello here, I have a problem with the use of UNION. If I query my database with the following: Quote: SELECT column1 FROM mytable WHERE title = "mytitle" UNION SELECT column1 FROM mytable WHERE author = "myauthor" I get a syntax error! (#1064) Why? I can;t find anything wrong in the query above.
Combining 2 Queries That Work
I want to keep text in the Table of database with the original format of line break and paragraph. I don't like merge text. Now I am using tag for keeping format. My database specification: Table Type: MyISAM. Format: dynamic Collation:latin1_swedish_ci. pls
What Do I Need To Do To Make This Query Work?
I must've been working too long hours this week, as my flow of ideas has come to a complete stop. Its really quite simple: 2 tables - bookings , invoices These two counts gives me precisely what I want PHP $unpaid_bookings = mysql_result(mysql_query("SELECT COUNT(id) FROM bookings WHERE invoice_id = 0 AND client_id = $id AND status != Ɔ' AND finish <= '$time'"),0);$total_bookings = mysql_result(mysql_query("SELECT COUNT(id) FROM bookings WHERE client_id = $id AND status != Ɔ' AND finish <= '$time'"),0); so I present this in a ratio, $unpaid_bookings / $total_bookings... awesome now, when I try and flip the coin and show unpaid invoices over total invoices, it all falls apart once I have more than 1 booking per invoice. First i'll explain the table structure. Each booking has a column `invoice_id`, which is assigned to the primary `id` of the invoice table. So one invoice might be associated with x bookings. PHP $unpaid_invoices = @mysql_result(mysql_query("SELECT COUNT(i.id) FROM invoices i, bookings b WHERE i.id = b.invoice_id AND b.client_id = $id AND i.is_paid = Ɔ'"),0);$total_invoices = @mysql_result(mysql_query("SELECT COUNT(i.id) FROM invoices i, bookings b WHERE i.id = b.invoice_id AND b.client_id = $id"),0); Again so it works fine when 1 invoice is associated to 1 booking, but when 1 invoice is associated with say 2 bookings, the invoice count will return two instead of one. The worst part is, I know exactly why (because there are two bookings for the invoice), I just can't get around it! I've tried all sorts of joins, group by's, and i'm not having any luck. I'm trying not to be weak and add the client_id into the invoice table,
Query Doesn't Work With Mysql4
Can someone tell me what's wrong with the mysql query below? It does work on mysql 5 but gives me an error with mysql 4. SELECT rev_profile_indiv. * FROM rev_profile_indiv, rev_profile_kids_indiv WHERE 1 AND reviewing IN ( 1, 0 ) AND active IN ( 1 ) AND contract IN ( 1 ) AND UNIX_TIMESTAMP( DATE( rev_profile_kids_indiv.birthdate ) ) >= UNIX_TIMESTAMP( ��-12-15' ) AND UNIX_TIMESTAMP( DATE( rev_profile_kids_indiv.birthdate ) ) <= UNIX_TIMESTAMP( ��-12-15' ) GROUP BY rev_profile_indiv.username ORDER BY lastname LIMIT 0 , 30;
Can't Get STRCMP Function To Work
Running MySQL 4.1.18 This statement always generates a syntax error: SELECT * FROM {table_name} WHERE STRCMP(somefield,'compare string')=0; {table_name} is the name of the table and it is correct. somefield is the correct name of a field in the table and the field is type VARCHAR Generates error: #1064 - 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 '( somefield , 'compare string' ) = 0 LIMIT 0, 30' at line 1
Adding Third Column Doesn't Work
CREATE TABLE img_cat( img_id INT NOT NULL, cat_id INT NOT NULL, order INT, PRIMARY KEY(img_id, cat_id) ); I'm looking to use this table to organise photographs into categories and then add the 'order' column to control the order they appear on the web page. Without the order column it works fine, with it it doesn't seem to work at all.
A Hash At The End Of A Fieldname Does Not Work
My Linux MYSQL 3.23.52 database server is working OK generally. However, in a database I have a field name that ends with a # (hash UK as opposed to £ which is a pound UK) i.e. [empnumber#] If I "select * from emptable" it works fine and the empnumber# field is listed correctly with all the other fields. If I "select empnumber# from emptable" I get returned "unknown column 'empnumber' in 'field list'" (#1054) from Access 2000. If I use Mysql on the server I get similar results. I cannot change the field names as these are constrained by the fact that this is not a new design of database.
EXIST / IN / And Subqueries Does Not Work
I have been trying to get this working for a while but with no use. I consulted the manual and even the JDBC manual which was developed by Mysql and all say the same think. Every time i try to use the phrase "EXIST" or "IN" or "NOT IN" or even using sub query, it fails telling me that i have a syntax error near .... (the above options). I am using Java and employing the JDBC driver from Mysql. The mysql server runs 3.2.3. I test all queries in Mysql Control Center (the one that i use to test my SQL statements) before deploying in code Sample sql:
Cannot Get MySQL Query To Work In .asp
I have a MySQL database and in the front-end software I am using to Run MySQL, I have created a query on the tables which runs in the front-end, similar to the MS Access query grid. I now wish to pull this query on-line using .asp, but I seem to have found out that I can only pull data from tables in MySQL? ....
Getting Utf8 To Work Properly
I have made a few tables in a database, and I'm trying to get my Japanese text to display properly. I have the collation set to utf8_general_ci, and I even added the mysql_query("SET NAMES 'UTF8'"); code into the php page. But even with all of that in, it still won't display properly. The characters show up as ã‚»ã‚*ãƒã‚¯ã«ã‚“ã˜ã‚ƒãŸã„ã‘ã¤ï¼ and other junk like that. Now this was working before until I added a second mySQL connection into the page, which inputs the second table. I'm not sure if you can make 2 connections on the same page, but I did and it pretty much messed everything up. I took the second table away, and things were still messed up. My question is how can I get the Japanese text to display properly? It does display properly on the phpMyAdmin page, but I get garbage on the actual page.
Subselect Doesnt Work
i am trying to remove values from a list menu if the join table doesnt have keys when a key is selected for instance: locations locationID locations_join locationID shotlistID SELECT SQL_NO_CACHE l.locationID , l.location FROM locations l LEFT JOIN locations_join lj ON l.locationID = lj.locationID WHERE l.locationID NOT IN (select locationID FROM locations_join WHERE shotlistID IN (5069)) ORDER BY l.location ASC so when shotlistID is selected all the keys from the locations_join joined to the shotlistID would be remove from the locations list please help, i'm trying to do this in one query saving from getting all the keys into an array then checking if the values arent in the array when generating the list.
Does MySQL Work On Windows?
I've been trying to get 3.23 to behave on '98. MATCH seems very erratic, and FULLTEXT never works. RELOAD silently fails. Is it worth it to pursue MySQL on Windows?
Can't Get Init_connect='AUTOCOMMIT=0' To Work
I've got MySQL 4.1.3 installed on RH 7.3... everything's fine so far except for getting the init_connect string to work. I followed the instructions on http://dev.mysql.com/doc/mysql/en/S..._variables.html and added the below line to my '/etc/my.cnf' file under [mysqld]: init_connect='SET AUTOCOMMIT=0' When I restart the server and start mysql, I can see that the init_connect was read: mysql> select @@init_connect; +--------------------+ | @@init_connect | +--------------------+ | SET AUTOCOMMIT=0 | +--------------------+ However, the Autocommit variable is still 1! mysql> select @@AUTOCOMMIT; +-----------------+ | @@AUTOCOMMIT | +-----------------+ | 1| +-----------------+
Unable To Get Mysqldump To Work
I am using the newest version of MySQL 5.0.7 beta. I have tryed everything to get mysqldump to work but just cant get it. Can someone tell me how to do this so that I can backup the db to a file in a certain folder on my computer?
GROUP BY Doesnt Work
i have a table that contains the folowing fields: some_table: company_number something_number price date_price_established for a certain company i need to get all the dates that prices were established. and i dont want any date_price_established to repeat themselfs. for example, for the following database: 1,1,15.5,1.1.2006 1,1,16,1.1.2006 1,1,17.5,1.1.2006 1,1,16,3.1.2006 the results will be : 1.1.2006, 3.1.2006. this is what i've tried: SELECT date_price_established FROM myDb.some_table WHERE company_number = 1 GROUP BY date_price_established";
Multiple ORDER BY Doesn't Work?
I have a table with two fields that I want to 'ORDER BY', the first is the day of the month which is a CHAR(2), and the other is the time which is a CHAR(4), in the following format: day is from 1 to 31 time is from 0000 to 2359 example rows are: 2 | 2345 28 | 0810 I want to order firstly by the day, then by the time, so that when using a select statement rows are ordered from 1 to 31 then if they are the same day from 0000 to 2359. However whenever I use the following clause: SELECT * FROM `fixtures` ORDER BY `day`, `time` ASC; it only ever orders by day. If two rows have the same day, then it orders them by insertion. I thought multiple ORDER BY was supported, is this the wrong layout of the statement?
How Does Record Locking Work?
I am having record locking issues - I need to be able to do it! I have spent a fair amount of time reading the available documentation and posts (at various sites), but not gotten any clear answers. So I have several questions about this whole subject: 1. Is there anywhere in the MySQL documentation that covers all aspects of record locking, including by engine? 2. Does "SELECT...LOCK IN SHARE MODE" or "SELECT...FOR UPDATE" lock records with any engines OTHER than InnoDB? 3. The way Sarah from AB MYSQL describes "SELECT...LOCK IN SHARE MODE" and "SELECT...FOR UPDATE" in another "record locking" post, it is NOT clear if the "lock" stops a "SELECT" from finding the record. So, does the lock simply stop the UPDATE or LOCK of the record by another process, or does it also stop the READ (via SELECT or anything else) from other processes? And, is that different for different engines? 4. From the documentation I've read, the assumption is that the UPDATE is "atomic", i.e., that no concurrent access by another process can occur between the testing of and the setting of the value field(s). Is that how it works? And, does it work that way with all engines?
Can't Get Init_connect='AUTOCOMMIT=0' To Work
I've got MySQL 4.1.3 installed on RH 7.3... everything's fine so far except for getting the init_connect string to work. I followed the instructions on http://dev.mysql.com/doc/mysql/en/S..._variables.html and added the below line to my '/etc/my.cnf' file under [mysqld]: init_connect='SET AUTOCOMMIT=0' When I restart the server and start mysql, I can see that the init_connect was read: mysql> select @@init_connect; +--------------------+ | @@init_connect | +--------------------+ | SET AUTOCOMMIT=0 | +--------------------+ However, the Autocommit variable is still 1! mysql> select @@AUTOCOMMIT; +-----------------+ | @@AUTOCOMMIT | +-----------------+ | 1| +-----------------+ Anyone seen this before or know what's wrong??
|