MySQL Forums
Forum List  »  Newbie

Re: sql_mode under phpMyAdmin
Posted by: Pete Haddow
Date: October 29, 2006 12:04AM

Okay, obviously I've written something very stupid as no replies at all. So, I'll try to simplify the question...

I am using phpMyAdmin 2.9.0.2 (MySQL client version 5.0.18) to communicate to a MySQL server version 5.0.24a-log. I am correctly connected to a database.

I click on the SQL tab and send the following statement, which executes successfully:

SET sql_mode = 'NO_ZERO_DATE,STRICT_ALL_TABLES';

I then send the following statement, which also executes successfully:

SELECT @@sql_mode;

However this second statement returns an empty value for the variable. Thus the session SQL mode appears to have lost its contents between the SET and the SELECT. I was led to believe that the session stayed open for the life of the phpmyadmin connect (or thereabouts). However perhaps I misunderstand this (hence my request in the newbies section).

On the contrary, the statements sent as the *same* SQL "command" under phpMyAdmin

SET sql_mode = 'NO_ZERO_DATE,STRICT_ALL_TABLES';
SELECT @@sql_mode;

execute successfully and return, as expected, the value of STRICT_ALL_TABLES,NO_ZERO_DATE for @@sql_mode.

If someone could explain this to me I would be most grateful and so would my girlfriend who is starting to get a wee bit hacked with my constant sobbing into the computer...

Pete

Options: ReplyQuote


Subject
Written By
Posted
October 28, 2006 07:01AM
Re: sql_mode under phpMyAdmin
October 29, 2006 12:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.