Search Results

Search found 36111 results on 1445 pages for 'mysql update'.

Page 110/1445 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • twitter like tweet update notification in asp.net

    - by dianuh
    we are adding new functionality in our application where in there would be some users posting short comments and on the other side there would be some users monitoring the activity or comments posted by the other users within the same application. my question is, what is the best way of implementing the notification of new comment availability(similar to tweet update notification)? FYI the application is on .Net 3.5.

    Read the article

  • Fatal error encountered during command execution with a mySQL INSERT

    - by Brian
    I am trying to execute a INSERT statement on a mySQL DB in C#: MySqlConnection connection = new MySqlConnection("SERVER=" + _dbConnection + ";" + "DATABASE=" + _dbName + ";" + "PORT=" + _dbPort + ";" + "UID=" + _dbUsername + ";" + "PASSWORD=" + _dbPassword + ";"); MySqlDataAdapter adapter; DataSet dataset = new DataSet(); command = new MySqlCommand(); command.Connection = connection; command.CommandText = "INSERT INTO plugins (pluginName, enabled) VALUES (@plugin,@enabled)"; command.Parameters.AddWithValue("@name", "pluginName"); command.Parameters.AddWithValue("@enabled", false); adapter = new MySqlDataAdapter(command); adapter.Fill(dataset); The plugin table consists of two columns: pluginName(varchar(50)) and enabled(boolean). This fails with the error: mysql Fatal error encountered during command execution. Any ideas on why this would fail?

    Read the article

  • PHP MySQL Update query

    - by Jordan Pagaduan
    I have a website that has an update query. Example. Table name - myTable Table Content - id(AI) name -- myName age -- 13 image -- (no values) birthdate -- (no values) I only put values in name and age. In image and birthdate, I haven't put anything. If I edit it and update it and I don't put anything in name and in age, I only put values in image and in birthdate. The output is like this. (This ouput I wanted) Table name - myTable Table Content - id(AI) name -- myName age -- 13 image -- myImage.jpg birthdate -- Feb. 31, 2010 This is my code: <?php //mysql connect... //mysql select database... $sql = "UPDATE myTable SET name = '".$name."', age = '".$age."', image = '".$image."', birthdate"'$birthdate.."' WHERE id = $id"; mysql_query($sql); ?> I used this code but the output is: Table name - myTable Table Content - id(AI) name -- (no values) age -- (no values) image -- myImage.jpg birthdate -- Feb. 31, 2010 Feel free to ask if you don't understand my question Thank you

    Read the article

  • Mysql SELECT FOR UPDATE - strange issue

    - by Michal Fronczyk
    Hi, I have a strange issue (at least for me :)) with the MySQL's locking facility. I have a table: Create Table: CREATE TABLE test ( id int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1 With this data: +----+ | id | +----+ | 3 | | 4 | | 5 | | 6 | | 7 | | 8 | | 10 | | 11 | | 12 | +----+ Now I have 2 clients with these commands executed at the beginning: set autocommit=0; set session transaction isolation level serializable; begin; Now the most interesting part. The first client executes this query: (makes an intent to insert a row with id equal to 9) SELECT * from test where id = 9 FOR UPDATE; Empty set (0.00 sec) Then the second client does the same: SELECT * from test where id = 9 FOR UPDATE; Empty set (0.00 sec) My question is: Why the second client does not block ? An exclusive gap lock should have been set by the first query because FOR UPDATE have been used and the second client should block. If I am wrong, could somebody tell me how to do it correctly ? The MySql version I use is: 5.1.37-1ubuntu5.1 Thanks, Michal

    Read the article

  • Update to php5.3 breaks connecting to mysql db

    - by bobbyb
    I just updated php to 5.3 and can no longer connect to my remote mysql server. I get the following errors: mysqli_connect(): OK packet 6 bytes shorter than expected mysqli_connect(): (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication It seems this has to do with the new mysqlnd driver. Is there a way to force it to use the old libmysql driver. Also, reverting to php5.2.11 doesn't seem to fix the issue which seems to work for most people. Anyone have any suggestions? thanks!

    Read the article

  • mySQL :syntax using in C#

    - by Meko
    Hi. I am using in C# MYsql .I have query that works if I run on MySql Workbench ,but in C# it does not return any value also does not give ant error too.There is only one different using on Mysql I use before table name databaseName.tableName , but in C# I think it doesn`t necessary. This is part of query which does not return anything. "(select Lesson_Name from schedule where Group_NO = (select Group_NO from sinif inner join student ON sinif.Group_ID=student.Group_ID where Student_Name=(?Student))"+ " And Day_Name =(select Day_Name from day inner join date ON day.Day_ID=date.DayName where Date=(?Date))" + "And Lesson_Time= (select Lesson_Time from clock where Lesson_Time <= (?Time)order by Lesson_Time DESC limit 0, 1) " + " And Week_NO = (select Week_NO from week inner join date ON week.Week_ID=date.Week_ID where Date=(?Date))) And Here all codes which executes when user click button. private void check_B_Click(object sender, EventArgs e) { connection.Open(); for (int i = 0; i < existingStudents.Count; i++) { MySqlCommand cmd1 = new MySqlCommand("select Student_Name,Student_Surname,Student_MacAddress from student ", connection); MySqlCommand cmd2 = new MySqlCommand("insert into check_list (Student,Mac_Address,Date,Time,Lesson_Name)"+ "values((?Student),(?MacAddress),(?Date),(?Time),"+ "(select Lesson_Name from schedule where Group_NO = (select Group_NO from sinif inner join student ON sinif.Group_ID=student.Group_ID where Student_Name=(?Student))"+ " And Day_Name =(select Day_Name from day inner join date ON day.Day_ID=date.DayName where Date=(?Date))" + "And Lesson_Time= (select Lesson_Time from clock where Lesson_Time <= (?Time)order by Lesson_Time DESC limit 0, 1) " + " And Week_NO = (select Week_NO from week inner join date ON week.Week_ID=date.Week_ID where Date=(?Date))))", connection); MySqlParameter param1 = new MySqlParameter(); param1.ParameterName = "?Student"; reader = cmd1.ExecuteReader(); if (reader.HasRows) while (reader.Read()) { if (reader["Student_MacAddress"].ToString() == existingStudentsMac[i].ToString()) param1.Value = reader["Student_Name" ]+" "+reader["Student_Surname"]; } reader.Close(); MySqlParameter param2 = new MySqlParameter(); param2.ParameterName = "?MacAddress"; param2.Value = existingStudentsMac[i]; MySqlParameter param3 = new MySqlParameter(); param3.ParameterName = "?Date"; param3.Value = DateTime.Today.Date; MySqlParameter param4 = new MySqlParameter(); param4.ParameterName = "?Time"; param4.Value = DateTime.Now.ToString("HH:mm"); cmd2.Parameters.Add(param1); cmd2.Parameters.Add(param2); cmd2.Parameters.Add(param3); cmd2.Parameters.Add(param4); cmd2.ExecuteNonQuery(); } connection.Close(); MessageBox.Show("Sucsess :)"); }

    Read the article

  • mysqldump from a query

    - by Hulk
    How do we take a mysql dump from the results of a query I need something like this.. `mysqldump -uroot -pxxxx mydb "select * from table where name='1';" /tmp/a Thanks

    Read the article

  • Setup Padrino with DataMapper and MySQL database

    - by Ivo Sabev
    Hello I am trying to setup a Padrino project using DataMapper and MySQL on my Mac OSX Snow Leopard. I have the necessary gems: dm-core data_objects do_mysql mysql (linked to my original Mac OSX installation) But when I try to start the padrino with PADRINO START from the console, I get the following error: /Users/ivolution/.bundle/ruby/1.9.1/gems/dm-core-0.10.2/lib/dm-core/adapters/mysql_adapter.rb:3:in `require': no such file to load -- do_mysql (LoadError) But as I said I do have do_mysql gem installed so there shouldn't be such error, I did bundle install in my project folder before trying to start Padrino. Any ideas?

    Read the article

  • Java Audit table logging, MySQL equivalent of CONTEXT_INFO.

    - by Julia
    Hi, I am looking for the MySQL equivalent of CONTEXT_INFO that is present in SQL Server. Or any other session variable like thing using which I can pass the username to the trigger. I am currently working on logging table data for audit. I need to pass the username of the logged in user to the delete trigger. Any ideas? We are deleting the rows from the table in a few cases and marking them as deleted in others. Any alternate solutions are welcome. I thought of using AOP but it could prove problematic when deleting a cascade. I want to look into Hibernate Interceptors, not sure at this point if that works. If I can find the MySQL equivalent of CONTEXT_INFO, my job is done and elegant as well. Thanks, Julia.

    Read the article

  • iPhone SDK mySQL

    - by Kevin
    Hello everybody, I'm starting on a new iPhone project, and this application mostly relies on mySQL. I have a mysql database running on my computer, and I need this application to send queries to the server to gain information. One example is creating and logging into an account. I have successfully done this on my windows vb.net application, but I know that objective c will be harder. This is basically getting text from the sql database and displaying it on the iPhone application. If someone could simply help me on that, I'll easily get started. So I hope that you guys help me out here :). Thanks Kevin

    Read the article

  • Strange problem with MySQL full text query

    - by Manish
    This probably has something to do with my understanding of full text search or perhaps a known issue. My Java code creates search term for full text search on MySQL like this - +word* This works fine if the value in the DB column contains more text than the word itself. However, if the value is exact - no result are returned. I expected it to return results when value is an exact match. Let me give an example - Assume that DB has column name with value "Manish", now if I search with this - +Manis* It does return the result correctly, but if I try this - +Manish* It doesn't return any result, though exact match exists in DB column - Name. How can I obtain the desired behaviour in both these cases? Removing + sign works, but it returns far too many results when there are two or more words. Any help, pointers would be highly appreciated! I am using MySQL 5.0 TIA, - Manish

    Read the article

  • ruby / rails / mysql performance degraded on Snow Leopard

    - by adamaig
    I've burned a bunch of hours on this. I'm not having problems getting things to build, but I am seeing that my test suite runs about 2x slower than when I was on OS X 10.5.x . I've spent a lot of time playing around with different optimization settings (learning to avoid homebrew's llvm-gcc compilation). I've just learned that I needed to tweaks /Library/Preferences/SystemConfiguration/com.apple.Boot.plist in order to get the kernel to boot in 64 bit mode. However, my rails app is still running a bit slower than before, even after warming up the mysql server. So what performance tweaks might i need to look into? Right now the stock ruby 1.8.7 runs faster than 1.9.1 for some things, and I'd really like to know if there is anything I should be looking for. All my dev software has been compiled for x86_64, mysql with -O2 optimization, using regular gcc (not llvm-gcc).

    Read the article

  • MySQL to AppEngine

    - by Daniel Naito
    Hi Nick! How are you? I'm from Brazil and study at FATEC (college located in Brazil). I'm trying to learn about AppEngine. Now, I'm trying to load a large database from MySQL to AppEngine to perform some queries, but I don't know how i can do it. I did some testing with CSV files,but is there any way to perform the direct import from MySQL? This database is from Pentaho BI Server (www.pentaho.com). Thank you for your attention. Regards, Daniel Naito

    Read the article

  • how to set charset for MySQL in RODBC

    - by lokheart
    I have a data with chinese characters as field names and data, I have imported them from xls to access 2007 and export them to ODBC. Then I use RODBC to read them in R, the field names is OK, but for the data, all of the chinese characters are shown as ?. I have read the RODBC manual and it said: If it is possible to set the DBMS or ODBC driver to communicate in the character set of the R session then this should be done. For example, MySQL can set the communication character set via SQL, e.g. SET NAMES 'utf8'. I guess this is the problem, but how can I provide this command to MySQL via RODBC? Thanks!

    Read the article

  • UNIX Timestamp to MySQL DATETIME

    - by Henk Denneboom
    Hi all, I have a table with statistics and a field named time with Unix Timestamps. There are about 200 rows in the table, but I would like to change the Unix timestamps to MySQL DATETIME. Without losing the current rows. What would be the best way to update the Unix Timestamp to MySQL's DATETIME? The current table: CREATE TABLE `stats` ( `id` int(11) unsigned NOT NULL auto_increment, `time` int(11) NOT NULL, `domain` varchar(40) NOT NULL, `ip` varchar(20) NOT NULL, `user_agent` varchar(255) NOT NULL, `domain_id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 So the time (INT) should be a DATETIME field. Thanks in advance!

    Read the article

  • Error 2006: "MySQL server has gone away" using Python, Bottle Microframework and Apache

    - by Jamie
    After accessing my web app using: - Python 2.7 - the Bottle micro framework v. 0.10.6 - Apache 2.2.22 - mod_wsgi - on Ubuntu Server 12.04 64bit; I'm receiving this error after several hours: OperationalError: (2006, 'MySQL server has gone away') I'm using MySQL - the native one included in Python. It usually happens when I don't access the server. I've tried closing all the connections, which I do, using this: cursor.close() db.close() where db is the standard MySQLdb.Connection() call. The my.cnf file looks something like this: key_buffer = 16M max_allowed_packet = 128M thread_stack = 192K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 It is the default configuration file except max_allowed_packet is 128M instead of 16M. The queries to the database are quite simple, at most they retrieve approximately 100 records. Can anyone help me fix this? One idea I did have was use try/except but I'm not sure if that would actually work. Thanks in advance, Jamie

    Read the article

  • PHP & MySQL - Deleting table rows problem.

    - by oReiLLy
    Okay my script is supposed to delete a specific users case which is stored in 2 MySQL tables but for some reason when the user deletes the specific case it deletes all the users cases I only want it to delete the case the user selects. I was wondering how can I fix this problem? Thanks in advance for helping. Here is the PHP & MySQL code. if(isset($_POST['delete_case'])) { $cases_ids = array(); $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT cases.*, users_cases.* FROM cases INNER JOIN users_cases ON users_cases.cases_id = cases.id WHERE users_cases.user_id='$user_id'"); if (!$dbc) { print mysqli_error($mysqli); } else { while($row = mysqli_fetch_array($dbc)){ $cases_ids[] = $row["cases_id"]; } } foreach($_POST['delete_id'] as $di) { if(in_array($di, $cases_ids)) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"DELETE FROM users_cases WHERE cases_id = '$di'"); $dbc2 = mysqli_query($mysqli,"DELETE FROM cases WHERE id = '$di'"); } } } Here is the XHTML code. <li> <input type="text" name="file[]" size="25" /> <input type="text" name="case[]" size="25" /> <input type="text" name="name[]" size="25" /> <input type="submit" name="delete_case" id="delete_case" value="Delete Case" /> <input type="hidden" name="delete_id[]" value="' . $row['cases_id'] . '" /> </li> <li> <input type="text" name="file[]" size="25" /> <input type="text" name="case[]" size="25" /> <input type="text" name="name[]" size="25" /> <input type="submit" name="delete_case" id="delete_case" value="Delete Case" /> <input type="hidden" name="delete_id[]" value="' . $row['cases_id'] . '" /> </li> <li> <input type="text" name="file[]" size="25" /> <input type="text" name="case[]" size="25" /> <input type="text" name="name[]" size="25" /> <input type="submit" name="delete_case" id="delete_case" value="Delete Case" /> <input type="hidden" name="delete_id[]" value="' . $row['cases_id'] . '" /> </li> Here is the MySQL tables. CREATE TABLE cases ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, file VARCHAR(255) NOT NULL, case VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE users_cases ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, cases_id INT UNSIGNED NOT NULL, user_id INT UNSIGNED NOT NULL, PRIMARY KEY (id) );

    Read the article

  • iPhone connect to MySQL database on local network computer

    - by Billy Blanks
    I'm a bit of a noob to iPhone programming and I've read up on using PHP as the connection between an iPhone app and a remotely hosted MySQL database, but what I need to do is to connect directly to a MySQL database running on a local machine in my office. The machine is behind the same gateway and has an ip address similar to 192.169.x.x. Is that possible without PHP in the middle or anything else for that matter? Thanks in advance. Really appreciate this site.

    Read the article

  • XML output from MySQL

    - by NumberFour
    Hi, is there any chance of getting the output from a MySQL query directly to XML? Im referring to something like MSSQL has with SQL-XML plugin, for example: SELECT * FROM table WHERE 1 FOR XML AUTO returns text (or xml data type in MSSQL to be precise) which contains an XML markup structure generated according to the columns in the table. With SQL-XML there is also an option of explicitly defining the output XML structure like this: SELECT 1 AS tag, NULL AS parent, emp_id AS [employee!1!emp_id], cust_id AS [customer!2!cust_id], region AS [customer!2!region] FROM table FOR XML EXPLICIT which generates an XML code as follows: <employee emp_id='129'> <customer cust_id='107' region='Eastern'/> </employee> Do you have any clues how to achieve this in MySQL? Thanks in advance for your answers.

    Read the article

  • Tomcat6 MySql JDBC Datasource configuration

    - by Bob
    Hi, I've always used Spring's dependency injection to get datasource objects and use them in my DAOs, but now, I have to write an app without that. With Spring I can write something like this: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://127.0.0.1/app?characterEncoding=UTF-8" /> <property name="username" value="u" /> <property name="password" value="p" /> </bean> But how can I use datasource in my DAOs without Spring or anything? I'm using servlets and JSPs only. Performance is very important factor. Thanks in advance!

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >