mysql

Need to send an XML request to a URL - where to start!

Hi guys, I need to send an XML request to a URL. Fairlu unsure where to start with this as it's not something I've attempted before. I'm doing this using PHP, and at the moment I'm calling the data from a mysql database where the last payment date is 90 days or over, showing it in a html table. Underneath this table I'd ideally like...

loops mixed up with MySQL

I'm writing a simple message board where you can reply to any thread and then reply to any reply and so on.... everything works well but is there a simple method to loop the query as this could potentiality go on and on and on $rsql = "SELECT * FROM rotd_mb WHERE reply='N' ORDER BY dateTime DESC"; $result = runSQL($rsql); while ($ro...

How to stop the stored procedure from timing out

Hi I have a problem with a mysql stored procedure I set it going on this import and sorting of data 1.5 Million rows it did 1/2Million and then stopped any ideas on how to stop these timeouts? I've tried a php cron but get the error Error = PROCEDURE fix_photos can't return a result set in the given context any ideas? Richard ...

Enum type with values containing spaces on it

Enum values can contain spaces on it? For example ENUM('item1','the item2','item 3'). It's allowed? I'm using MySql. ...

Using SUM on FLOAT data

One table: items(id, price) Has one row: id: 1, price: 565.8 SELECT price FROM items gives 565.8 SELECT SUM(price) FROM items gives 565.799987792969 instead of 565.8 which I'd expect. Where does the 565.799987792969 come from? ...

Is there a better way of this MySQL CASE SELECT ?

The last two parameters are PHP WHERE and ORDER clauses, they (probably) don't matter here. fornecedores.nome_emp AS nome_fornecedor, exchange_rates1.rate AS rateEUR_USD, exchange_rates2.rate AS rateEUR_AOA, CASE produtos.moeda WHEN 'AOA' THEN produtos.preco_custo / exchange_rates2.rate WHEN 'EUR' THEN produtos.preco_custo WHEN 'USD'...

Select statement using 2 tables returns 4million reocrds instead of 500k

I created a small mapping table to associate values with values from another table. When I perform the select I get back 4million reocrds~. I know it has to be something trivial I'm doing. Would appreciate if someone could A) Tell me what I'm doing wrong and B) Tell me what literature I should be reading so I understand these issues :)...

Undefined Variable in PHP

Hi guys, I'm working towards sending an XML request to a URL using cURL in PHP. First I just wanted to make sure my request is sending the right data so here is a snippet from my code. I will add the curl statements in later once I know i'm sending the right data. here is my code so far: $format = 'Y-m-j G:i:s'; $date = date ( $fo...

Writing an inheritance query written in SQL using an inner join?

I confess that my knowledge of SQL (using mySQL) extends little beyond the standard queries required for database management, and that the majority of my data manipulation has been done through php. I have been keen to change that, and have enjoyed success until now, and would appreciate it if someone could advise me on how I create a s...

Mysql utf8_unicode_ci multilanguage support

Are these languages supported by mysql 4.1.14 if i use utf8_unicode_ci? Australia,Austria,Belgium,Bulgaria,Canada,Czech Republic,Denmark,Estonia,Finland,France, Germany,Greece,Hungary,Ireland,Italy,Latvia,Lithuania,Luxembourg,Malta,Netherlands Poland,Portugal,Romania,Slovakia,Slovenia,Spain,Sweden,Switzerland,United Kingdom,United State...

Mysql won't start - ibdata1 corrupt? - operating system error number 13 - permissions issue

Server shutdown from power failure. Mysql will not start now. Disk is not full. Syslog is below Oct 11 15:03:31 joe mysqld_safe[24757]: started Oct 11 15:03:31 joe mysqld[24760]: 101011 15:03:31 InnoDB: Operating system error number 13 in a file operation. Oct 11 15:03:31 joe mysqld[24760]: InnoDB: The error means mysqld does not have ...

Flex/Air : Flex, BlazeDS, Hibernate (Tomcat) and MySQL

Hello, I create a Flex application that works with a browser using a database with the MySQL server that I can create, modify and delete data from a database. The problem I encounter now is that I want to see my program with Adobe AIR (virtual machine). At the display that does not pose a problem. The problem is that air can not reach t...

How to Store alert messages in MySQL

I plan on creating a Facebook style alerts system and I am wonder what is the best way to store the alerts. What kind of table should I use? This is what I was thinking: CREATE TABLE `alerts`( id INT NOT NULL PRIMARY KEY status enum('active','inactive','deleted') DEFAULT active, user_id INT NOT NULL, message VARCHAR 255 ...

MySQL time between days

I have an application storing the times a restaurant is open: My code to get the currently open restaurants. My SQL query (simplified) looks like SELECT * FROM `restaurants` r WHERE r.from <= NOW() AND r.to >= NOW(); The problem here is, there's an entry which rolls over -- it's for a restaurant open from 11 AM to 3 AM the ...

Incorrect key file problem with MySQL - InnoDB Table

I REALLY hope somebody can help me with this as it's been hard to get help for it elsewhere, including mysql.com Anyway... I'm having a problem with a InnoDB (table was initally MyISAM, but converted it to InndoB awhile ago) table; I am trying to run this query: SELECT posts.id, posts.post_title FROM rss_posts AS posts INN...

Why is my PHP prepared statement for MySQL not working?

I'm currently learning PHP and MySQL. I'm just wrote a class that handles all the MySQL traffic, but I'm encountering some errors. function table_exists($tablename){ // check if table exists $stmt = $this->db->prepare("SHOW TABLES LIKE '?'"); $stmt->bind_param("s", $tablename); //This is line 24. $stmt->execute(); $a...

MySQL query to check for certain phrases (duplicate article, plagiarism)

Is there a way to check for multiple phrases in mysql? I need to check if an article have a duplicate version stored in mysql. This is the algorithm I first create an array of sentences that needed to be check (removing all non-alpha-numeric characters) Then Build the query (how?) After I get the result I compare if 50% of the sentenc...

Need Time-Efficient Method of Importing Large CSV File Via PHP Into Multiple MySQL Tables

Okay, I'm having some serious issues here. I'm new to this site, and new to dealing with importing CSV data via PHP, but I'm not new to programming. Currently, I'm working on building a Customer Relationship Manager. I need to create a script to import a file that will populate the database with leads. The main issue here is that the Le...

MySQL Exhausting 1.5TB of Disk Space During Sort

I have a table with about 1.4 billion records, with the following format: mysql> describe _2009all; +---------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+--------------+------+-----+---------+-------+ | userId | int(11) | YES | MUL |...

What I must look into when porting big project from MySQL into Oracle?

So I have lots DB tables. I need to port my DB into Oracle. I have no problems on MySQL but must port onto oracle. so what are main tips&trics when going oracle from mysql? ...