mysql

Is it possible to change a single database to use InnoDB instead of myISAM on mysql

I want have a single database that uses InnoDB tables instead of myISAM tables (myISAM gives me good performance generally so I don't want to stop using it altogether). Is it possible to specify that a database use InnoDB tables if the default is myISAM. ...

MySQL TIMESTAMP value greater than '2038-01-19 03:14:07'

I'm wondering what will happen after 2038-01-19 03:14:07 with table fields using TIMESTAMP as data type? I always preferred DATETIME but you apparently can't assign CURRENT_TIMESTAMP as default value to that type. I mean, 28 years is not so long when you think about it (in my opinion anyway)... So what will happen to all those TIMESTAMP...

PHP:MySQL what if we don't close the opened connections

in PHP + mySQL $conn = mysql_connect("server","user","pass"); mysql_select_db("datbasename"); this is what we do to open a connection. and mysql_close($conn); this is what we do to open a connection. WHAT if we don't close the connections...what are going to be the effects after what CONDITION the opened connections a re automati...

PHP:MySQL - Security Threats

Possible Duplicate: What security issues should I look out for in PHP what are the SECURITY THREATS while using PHP connected with MySQL what STEPS should be followed\insured to maximize security ...

10 different domain names with 2 php files only database query changes

i have 10 domain names which has 2 php files index.php, inside.php only query changes as per site id right now i am uploading 2 pages through ftp to 10 sites is there any easy way to do this? ...

(MySql) Why NOT NULL add to primary key field?

Why NOT NULL add to primary key field?(primary key is already not null+unique) Example for NOT NULL id field: create table student ( id int(11) AUTO_INCREMENT NOT NULL, name varchar(255), PRIMARY KEY(id) ) Instead Just: create table student ( id int(11) AUTO_INCREMENT, name varchar(255), PRIMARY KEY(id) ) Edit: I add AUTO_IN...

what is good, explicite cursor in backend or loop in front end?

what is good,using explicite cursor,while loop on database side OR using loop on front end (application side programm)??? Edited:- Hi,if I want to iterate and i am using ado.net asynchronous(disconnected) connection (ie.I have a datatable and i am applying for loop on datatable in front end) -- In this case,If i want to iterate which is...

Getting familiar with XAMPP

Iam not able to get familiar with XAMPP interface on Windows7 (Only prior experiencxe is with HTML,C,C++). How to proceed to begin development work in PHP and MySQL and test developed contents using Apache Server. Please help to understand its working flow. Thanks in Advance. ...

many to many table - 1 seperate field primary key or 2 existed fileds primary key (Example inside)

Hi, I have 2 tables with many to many relation: student ( id int(11) NOT NULL, name varchar(255), primary key(id) ); teacher ( id int(11) NOT NULL, name varchar(255), primary key(id) ); and I should do 3 table - student_has_teacher option add id separate field primary key student_has_teacher ( id int(11) NOT NULL, teacher_i...

How much amount of data can be store in MyISAM DB?

How much amount of data can be store in MyISAM DB? Can you Guys Says How Much TB? ...

Which database for a web crawler, and how do I use MySQL in a distributed environment?

Which database engine should I use for a web crawler, InnoDB or MYiSAM? I have two PC's, each with 1TB hard drives. If one fills up, I'd like for it to save to the other PC automatically, but reads should go to the correct PC; how do I do that? ...

How to insert xml into Mysql?

Hi, this questions looks really easy but I'm a noob in C++ and MySQL so it still doesn't work. Here is the deal: I have a string (_bstr_t) that contains the xml and I want to store it in a longblolb column in MySql. Ways I tried that failed: write my xml on a local file and use mysql command LOAD_FILE, this worked localy but not on...

mysql query taking 30 seconds to execute...too long

I'm trying to run a MySQL query as a search on a site and it is just taking a long time. I ran it directly from phpMyAdmin and it took around 20 seconds to complete. Here is the query I am running: SELECT * , bb_business.id AS bid FROM bb_business LEFT OUTER JOIN bb_offers ON bb_business.id = bb_offers.store_id LEFT OUTER JOIN bb_cat...

JPA update many-to-many deleting records

I have a @ManyToMany relationship between two entities. When I perform an update on the owning side, it appears that JPA deletes all the linked records from my database and re-inserts them. For me this is a problem because I have a MySQL trigger that fires before a record is deleted. Any ideas on how to get around this problem? Thanks R...

Remove the Root Password MySQL

On a test server I would like to remove the root password in order to test some security. I don't want to change the password or set it to blank (which is what every guide online seems to tell you to do) I just want root to not need a password to authenticate. ...

Kohana3 ORM: loading Key/Value Attributes

I have two MySQL-Tables (oversimplified): articles - id - description article_attributes - article_id - attribute_name - attribute_value So, every article can have an unlimited amount of attributes. For the articles i have a Kohana_ORM Model <?php class Model_Article extends ORM {} ?> When loading the Model I would like to have ac...

What did Index Means in DB?

Hey Friends Whats does "indexing" mean? How it is useful to a web crawler? ...

mysql 5.1: how can i use benchmark() command to test a call to a stored procedure ?

Hello I'm trying to benchmark a stored procedure. select benchmark(100000000,(select 1)); this benchmark works but the following benchmark doesn't: do benchmark(1000,(call test_login_user('a'))); it produces the following error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your...

PHP/MySQL news archive

Hi, I'm a bit stuck trying to get my code to output correctly, see below. It all works ok, but rather than displaying all news items, it only shows one for each month. What I need to do is group all news for a selected month with the month/year heading for that month. Hope this makes sense. Any help greatly appreciated. SS $theQuery="...

MYSQL - searching strings within a select

Hi, I want to be able to search a field in the database and see if the "changed from" and "to" values are different(the values are stored within a string in a single field). Here is an example of what the string in the field looks like Instance Person(34) modified by 1. Field phone_number changed from "123" to "123". Current field va...