mysql

Free comment reply system like intensedebate?

Is there any free script in PHP/MYSQL or in ASP.NET/SQL Server for comment reply system like intensedebate.com. In intensedebate we can reply to any comment or reply. I need the similar free script which I can modify according to my website needs. Please let me know if anybody knows any system like this or if anyone has some concept whi...

" INTO OUTFILE " statement terminated without completion locks the file

i am creating a csv by using "INTO OUTFILE" statement for a mysql database. the database is huge 0.4 million records. i am using java program from eclipse to connect to mysql database and give this OUTFILE query. sometimes after running the query from program i do not want to wait for the whole query completion.so i terminate the java pr...

mysql syntax error on creating index.

i have two mysql tables tableA col1 col2 SIM1 ..........col24 ----------------------------------- a x 1 5 b y 1 3 c z 0 2 d g 2 1 tableB colA colB SIM2 ------------------- x g 1 y f 0 x s 0 y e 2 ...

MySQL has no transaction support?

Hello everyone, I heard MySQL has no transaction support at all? Is that true? If yes, how could people write reliable code to make sure data consistency and reliable compared to other commercial database (e.g. Oracle/SQL Server)? thanks in advance, George ...

choose MySQL or choose SQL Server Express (free)?

Hello everyone, I need to develop a mid-sized Inernet facing web site (e.g. less than 1000 users) for information sharing and simple workflow. Since limitation of budget, I am choosing free database. And since the developers are familiar with .Net, C#/ASP.Net is the choosen programming language. I am using Windows Server 2008 x64 editio...

Why do I get \N when executing INTO OUTFILE query?

I am connecting to a MySQL database using Java. I am executing this query: String query = "SELECT * FROM TT2 " + "INNER JOIN " + "`Language Pref` " + "ON tt2.msisdn = `language pref`.MDN " + "INTO OUTFILE 'c:/test12226.csv' " + "FIELDS TERMINATED BY ',' " + "EN...

Set Table character-set/collation using Hibernate Dialect ?

I use Hibernate MySQLInnoDB Dialect to generate DDL's. hibernate.cfg.xml : <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> How can I configure the character-set/Collation to 'utf8_general_ci' for the generated table? ...

Random Number Generation in Mysql PHP

Hi, I have 16 million records and need a 8 digit UNIQUE random number for each record, also I want all the numbers to start with 01, and store them in a seperate table, so I can assign the UNIQUE numbers to each record. I am unsure of how to do this in PHP in order to get 16 million UNIQUE numbers? Please help?! J. ...

Efficient php/mysql query to generate a html table in php

I have 3 tables in my MySql database. ------------- | countries | ------------- | iso | | name | ------------- -------------------- | documents | -------------------- | id | | country_iso | | publication_date | -------------------- --------------- | files | --------------- | document_id | | ...

mysql select unique records

I've got the following query: select * from members,subscriptions where members.MemberID = subscriptions.MemberID and subscriptions.Year = 2009 and members.ASSCID = 15 and subscriptions.Untildate between '$2009-01-01' and '2009-12-31' order by members.Memberlastname Members pay either their annual subscription once (annual subscription...

Replacing charachers in a mysql database

I have transfered a big phpbb3 database from a latin1 database to an utf-8 Everything went ok, now I need to change the "strange" characters in the database. Yesterday I found a method that worked, now I can't find it anymore, I tried: update phpbb_topics set topic_title = replace(topic_title, 'Ã', 'à'); update phpbb_topics set topic_ti...

Why is strtotime($lastmoment) bigger than time()?

The following code echo $lastmoment."<br/>"; echo time(); echo "<br/>"; echo strtotime($lastmoment); outputs: 2009-12-15 17:40:53 1260876829 1260898853 What's wrong? $lastment is a past time stamp in MySQL, why is strtotime($lastmoment) bigger than time()? ...

MySQL import database fails

I have 2 MySQL databases 1_029f4ab_0 and 1_029f4ab_1 I want to copy the contents of 1_029f4ab_0 into 1_029f4ab_1 The structure of both databases are identical 1) I EXPORTED a wordpress database 1_029f4ab_0 and file was saved as "localhost.sql" to my laptop 2) In myphpadmin, I selected the second wordpress database 1_029f4ab_1 and cho...

Django full-text search with MySQL InnoDB

How do you configure Django for full-text search with MySQL-InnoDB. MySQL Myisam engine supports full-text search but I will use InnoDB. Is that the best way to use Sphinx? If you explain your configuration I will appreciate. (By the way I wonder how it works with postgresql too.) ...

Why do I need to use foreign key if I can use WHERE ?

A beginners' question about foreign key in MySQL. In w3cshool it says, A FOREIGN KEY in one table points to a PRIMARY KEY in another table. And also there is WHERE, WHERE id = page_id So if I can use WHERE for linking the tables, what is the main purpose of having foreign key? ...

Reason to use DECIMAL(31,0)

What is the reason that some people from Oracle background are using DECIMAL(31,0) for integers. In MySQL it is not efficient. ...

Storing large prime numbers in a database

This problem struck me as a bit odd. I'm curious how you could represent a list of prime numbers in a database. I do not know of a single datatype that would be able to acuratly and consistently store a large amount of prime numbers. My concern is that when the prime numbers are starting to contain 1000s of digits, that it might be a bit...

Please help, my program is not accepting MySQL floats

I have to use a java program . I need to understand it and then modify it. The program has a source folder. It has a lot of java files. the program has a GUI interface. i have imported the program in eclipse and i can run the program. i want to learn and understand the code but since its too big i want to only read the relevant portions ...

Retrieve 2 last posts for each category.

Hello, Lets say I have 2 tables: blog_posts and categories. Each blog post belongs to only ONE category, so there is basically a foreign key between the 2 tables here. I would like to retrieve the 2 lasts posts from each category, is it possible to achieve this in a single request? GROUP BY would group everything and leave me with only...

Problems installing MySQL-python-1.2.3c1 on Mac Snow Leopard

Hi All I am having a problem installing the Python MySQL connector (MySQL-python-1.2.3c1) on my Mac OSX Snow Leopard. System State I have manually compiled an installed: mysql-5.1.41 This seems to work fine, as I can create and query a database from the commandline. I have compiled: MySQL-python-1.2.3c1 I first set the following in ...