mysql

truncate all table in mysql database

Is it possible to truncate all table in mysql database ? what is query for that . ...

Would any configuration or INNODB principle cause the following MYSQL update to not necessarilly perform all updates?

<?php $query = 'SELECT id FROM transaction_table'; $result = db_query($query); while($row = db_fetch_array($result)) { //do some processing db_query('UPDATE transaction_table SET updated = "1" WHERE id = "%s"',$row['id']); } ?> Every time this script run, it only updates a few random rows (8-25 on ...

php and mysql help, working with multiple database

Hi, I need to work on multiple database, and below is my current code. Following code seems to be very very slow and having issues with multiple connection while I view the mysql connection list. So can anyone let me what's wrong with the code and help me to correct the issues and faster performance. $dbHost="localhost"; $dbUser="use...

MySQL field type for storing decimals

I'm creating a DB that will hold products with several "height" columns (in meters, for ex 7.79 or 12,8). Never more than 2 digits before and 2 after the decimal point. What field type should I use for this? If I use decimal(2,2) an try to insert 7.79 in phpmyadmin I get an error saying Warning: #1264 Out of range value for column 'work...

I need sample of MySQL Workbench of EER diagram?

Any one have sample EER diagram of MySQL Workbench? ...

How to reset(?) a (out-of-sync)DB on a MySQL master-master replication

I have a master-master MySQL replication. It was delicious until yesterday but, for some reason which I could not figure it out yet, they lost synchronization. I've been wandering around forums and several tools, tips and advices but it seems like I cannot not figure it out myself in time. So I have the idea just to reset the problemati...

Add a lot of data into database using several stored procedures

I have 3 stored procedures AddProduct, AddProductProperties and AddOffer. I need to import data from various datasources in database using this procedures. Structure of datasources is variable, so it may contains only products or offers or both. My algorithm is to read record from data source and then call necessary procedures. To cal...

Storing a URL value in MYSQL

Hi everyone, I am developing an URL bookmark application (PHP and MySQL) for myself. With this application I will store URLs in MySQL. The question is, should I store URLs in a TEXT column or should I first parse the URL and store its components (host, path, query, fragment) in separate columns in one table? The latter one also gives m...

Where does the Symfony plugin 'sfLucene' get the information about my database schema from?

A month ago I adjusted my database schema. I added a column called ordinal. I rebuilt my model and uploaded my changes. Everything works fine apart from my instance of sfLucene will not rebuild. I run symfony lucene-rebuild frontend But I get the error once it gets to the Model in question (others are fine): propel exception: unk...

What's the language for Socket Server

Hi, What’s the best language and IDE to develope socket server? I want a language I can learn quickly that will work on an enterprise level. Please set me up with some good resources:) Thanks RECOMMENDED LANGUAGES 'I only know Flash and scripting languages' • JAVA • C languages and VB++ • PHP I’m tring to get my Flash animations to co...

Is it possible for mysql to create a distributed database ?

Is it possible for mysql to create a distributed database ? http://en.wikipedia.org/wiki/Distributed_database ...

OPENCV : reading CvSeq after SURF Extract

Hi there, I'm trying to put CvSeq data into a database (rdbms like mysql). Right now, what I could do is to store it in a file, here's what I do : Filling a CvSeq with CvExtractSurf Saving to file with CvSave But I'd like to store it in a DB instead of a File, so I guess there's a trick to read the CvSeq structure and fill a DB tab...

I want to refresh a form after posting it back to itself with php or ajax.

My project is a bistro menu, using PHP and MySQL. It prints out a pretty table of menu items, as long as they are in stock. I made addRemove.php to add and remove items from the menu. It creates a button for each item, on or off. Items that are 'on' are in stock and displayed on the menu. When the user clicks a button, it will post the...

View in Mysql crashes the DB

Our DB crashed (mysql 5.2) and the reason when i looked was show create table <view_name> This was not logged as a slow query, but was a pointer value in the crash debug. I really can't understand this, can a view in the DB crash the DB? Although i can think of removing this view and test, it will be helpful if any of one faced thi...

vc++ - I want to compile a program which uses mysql, please direct me

Hai, I done a server program in vc++(using visualstudio 2008). At that time it worked perfectly. But after that I uninstalled the visualstudio 2010. Now I can't open that pro file using vs2008(it is saying that it can't open the file). So I copied the header,cpp files and tried to compile , but it's not compiling. I added the libmysql.l...

Json - Mysql Charset Problem

I convert my php array to json using json_encode, Than I record this json data to my database .While json_encode encodes my data , It also converts strings to utf8 , this changes special characters to something like '/u011f' or '/u0131' . But when I write this converted data to mysql database , Backslashes are disappearing in field, so ...

tokenizing a metafield.

I am working with a CMS like system, which has a special field defined for use in its forms. This field works similarly to google suggest, executing an sql query behind the scenes and displaying results. The SQL query I am using selects 3 fields from table1, and concatenates them as a result. What I need to do, is split this new metaf...

Rails, Redmine, Mysql and SQL Server encoding problems

We had redmine working with mysql (and mysql works fine with utf8). Now we needed to migrate the database to SQL Server (latin1 is the default for us). The data acentuation is ok in SQL Server after the migration, but in the browser, data coming from the database is showing ? in the acentuation place. What could be the solution to show c...

How to generate case sensitive columns with JPA in MySQL automatically

How can I order JPA to set a MySQL database column with text content as case sensitive by default upon creation? ...

How can I make a radio button control all of this?

When visitors register on my site, they will do so as the founding member of a group or as a person joining an existing group. Nobody is "group-less." I have a single registration page with the following fields: first name, last name, (radio buttons to choose group type: New or Existing), group name, group password, email, pass, confirm...