Professional Hypertext Preprocessor, a widely used platform for dynamic web applications.

learn more… | top users | synonyms

4
votes
1answer
763 views

mysql change password in session

I changed my password from old hash to a new hash using the following query SET SESSION old_passwords=FALSE; SET PASSWORD = PASSWORD('[your password]'); I found this query on Mysql password hashing ...
3
votes
2answers
148 views

Selecting large data set on windows and linux

I need to parse a large data set, something like: mysql_query("SELECT * FROM largeTable") while($r = fetch()) { //> Do something } I just need 1 row to be in memory at time, because I need to ...
1
vote
1answer
356 views

How to get a unique highscore per user

I have the following tables: users, highscores I would like to get the top ten best results in highscore. The scores should be unique, meaning one score per user. I tried using INNER JOIN and GROUP ...
2
votes
3answers
779 views

Move Oracle data to and from MySQL with the help of PHP?

My application is in PHP which by default uses MySQL db. I have connected MySQL & Oracle dbs with PHP. Now I want to move data from Oracle db into Mysql db through PHP. Is it possible to do? Is ...
1
vote
1answer
134 views

Mysql database design with XML

I intend to create a wiki webpage, but it has some few more limitations than regular wikis. The content is completely user-editable, but the structure of the page is determined previously. To make ...
1
vote
1answer
94 views

keeping database columns consistent with documentation

For a project, the client wanted to be able to add fields to any item and have them be searchable. To make them searchable, that would require the fields to take a column, but that would make the ...
0
votes
1answer
171 views

What would be the best way to design a table in Mysql that handles read items in an RSS feed reader?

I'm working on an RSS feed reader, it is mostly functionnal. But after some time beta testing it, I noticed that its very slow running some queries on a table that handles all the items that have been ...
0
votes
1answer
1k views

I want to count all the rows for todays / yesterdays date based on a DATETIME - mysql+php

I have database "db2" with table "menjava" In table menjava have "id", "author" and "date_submitted" field id - auto_increment author - int(11) date_submitted - datetime I want to count all the ...
6
votes
7answers
36k views

importing large SQL file phpmyadmin

I am trying to import this SQL file in phpmyadmin and got this message #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right ...
2
votes
2answers
1k views

Preventing mysql deadlocks in your php application that uses SELECT… LOCK IN SHARE MODE

If I understand SELECT ... LOCK IN SHARE MODE correctly, you can place it into a mysql transaction to select the rows you will be working with during that transaction. This is done in order to "lock ...
4
votes
1answer
2k views

MySQL 'LOAD DATA INFILE' : Can't replace entry when foreign key exists

Here's a minimal case for my database scheme: CREATE TABLE `test` ( `id` int(11) NOT NULL, `name` varchar(22) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT ...
3
votes
3answers
134 views

Is there any way to temporarily enforce columnar uniqueness on items currently being inserted?

Is there any way to temporarily enforce columnar uniqueness on items currently being inserted? For instance, I'm splitting payments and charges to their own tables from a previously unified ...
6
votes
1answer
378 views

Application Settings in Database

In the past I have stored all generic settings and configuration items such as: custom application title, home address, version, debug, etc.. all in a "settings.php" file that I would include into all ...
3
votes
2answers
515 views

Testing Query Speed

When I'm running a query for the first time, it takes x miliseconds to be executed. When I run it the second time it takes a lot less time. I assume that it is some caching involved in this mechanism, ...
4
votes
2answers
775 views

MySQL connection doesn't work anymore

I had two MySQL servers running (127.0.0.1:3306 and 127.0.0.1:3307). Now I get this strange error: mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet' I can ...