mysql

Problem installing MySQLdb on windows - Can't find python

I'm trying to install the module mySQLdb on a windows vista 64 (amd) machine. I've installed python on a different folder other than suggested by Python installer. When I try to install the .exe mySQLdb installer, it can't find python 2.5 and it halts the installation. Is there anyway to supply the installer with the correct python loca...

WHat are limitations of Implementing MySQL NDB Cluster

Hi, I want to implement NDB cluster for MySQL6. I want to do it for very huge data structure min 2 milioon databases But I want to know is there any limitations of implementing NDB cluster. eg-> RAM size, or is there any limitation on creating number of databases, or limitations on size of database for NDB cluster. Thanks Sunil KUmar...

Big SQL SELECT performance difference when using <= against using < on a DATETIME column

Given the following table: desc exchange_rates; +------------------+----------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | time | datetime | NO | MUL | NULL | | | base_currency | varchar(3) | NO | MUL | NUL...

Deleting Multiple records in php My sql

<?php $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="toybox"; // Database name $tbl_name="Emp"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("canno...

retrieving a mysql query

I have written a mysql query and fetched the result as an assoc array using mysql_fetch_assoc().The query returns a list for two fields.I am looping through this field using through the result array and am extracting the value.how do i display the two fields since doing a plain echo is not working for me?The code which i have written is ...

1000's of tables or multiple instances of mysql?

I've inherited a company application that uses 58 tables per "object", and the application can have N objects. We are looking at an install of 75 - 100 objects for an application, which is 4300-5000 tables. What we are trying to figure out is do we want to use one database and prefix the table names per object, or use one database per...

SQL DELETE with JOIN another table for WHERE condition

I have to delete rows from guide_category that have no relation with guide table (dead relations). Here is what I want to do, but it of course does not work. :) DELETE FROM guide_category AS pgc WHERE pgc.id_guide_category IN (SELECT id_guide_category FROM guide_category AS gc ...

Converting Data Provider for Entity Framework

I am trying to migrate an Entity Framework Model from SQL server to MySql. I'm doing this because I'd like to do a project with Entity Framework to learn more about it, but I am on a shared server that only allows 1 SQL server database (which I'm using), and 5 mysql databases. It's possible that I'd move servers in the future, so I li...

What is wrong with this query (select ... where in (select ...)?

iplist table (id, username, ip, created) - stores the distinct IP addresses of each user I want to find all the usernames who ever had the same IP address as 'angryuser' MySQL QUERY: SELECT username, ip FROM `iplist` WHERE ip IN ( SELECT ip FROM iplist ...

SQL syntax errors when using php echo $_SERVER['PHP_SELF'];

I'm trying to submit a page onto itself by using php echo $_SERVER['PHP_SELF']; but keep receiving the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1.... There are different forms on the page and I am having the same prob...

What's wrong with this MySQL query? SELECT * AS `x`, how to use x again later?

The following MySQL query: select `userID` as uID, (select `siteID` from `users` where `userID` = uID) as `sID`, from `actions` where `sID` in (select `siteID` from `sites` where `foo` = "bar") order by `timestamp` desc limit 100 …returns an error: Unknown column 'sID' in 'IN/ALL/ANY subquery' I don't understand what I'm doing wron...

DB in MySQL migrate to Oracle DB

Hello. I need to migrate some tables in mysql db to oracle db. Do you now any tutorial to learn about this migration? Thanks ...

MySQL conditional drop foreign keys script

I'm involved is a project to migrate a project from Oracle to MySQL. I Have a script that i'm running from the MySQL shell command, called CreateTables.sql that looks like this internally: source table\DropForeignKeys.sql source tables\Site.sql source tables\Language.sql source tables\Country.sql source tables\Locale.sql source tables\T...

MYSQL query to return most recent entry regardless of date entered

Hello, I am really bad explaining but I'll try... I want to create a MYSQL query that returns the data based on the last entry in the table. I did it fine with the MAX function based on the date, but I need more advanced in terms of finding the last item entered by a specific product and return the last qty even if it's not the same dat...

MySQL Triggers: How to know which script called it?

I have a mysql trigger that logs every time a specific table is updated. Is there a way to also log WHICH PHP SCRIPT triggered it? (without modifying each php script of course, that would defeat my purpose) Also, is there a way to log what was the SQL statement right before the UPDATE that triggered it? Thanks Nathan ...

How can I make DIVs do this with jquery?

I am trying to reproduce the lock function on posts on facebook with jquery and php/mysql. Below is an image showing the different actions it does when clicked on. I think you would do somehing like on hover, show a hidden div with a tooltip, on hover off remove it. On click event show another hidden div but somehow has to change the ...

unbuffered query with MySQLi?

Are MySQLi queries unbuffered? If not, is there a way to do an unbuffered query, as with the non-MySQLi mysql_unbuffered_query()? ...

MySQL - Coming up with a Unique Key for each record, not the primary Key

Ok this is a tricky one to explain. I am creating an app that will have PAGES, currently I'm using PageID as the key to SEL the record. The issue I'm having now is that I want users to be able to EDIT pages, but not lose the previous page (for history, recording keeping reasons, like a changelog or wiki page history). This is making m...

Freely available example datasets of hierarchical information, and realistic names

I'm about to write some example applications and accompanying documents comparing ways of accessing information stored in relational databases. To demonstrate real-life requirements, I need to include a realistic dataset of hundreds of thousands of facts. Is anyone aware of publicly available, free datasets of that magnitude, of dataset...

real-time data warehouse for web access logs

We're thinking about putting up a data warehouse system to load with web access logs that our web servers generate. The idea is to load the data in real-time. To the user we want to present a line graph of the data and enable the user to drill down using the dimensions. The question is how to balance and design the system so that ; (...