in mysql database context, what is the difference among these 3 terms?
stored procedure,stored routine,stored function.
p.s. build-in functions like those date time functions, (weekday()) are considered as what?
thanks in advance!
...
I have this code (mySql 5.1.36)
CREATE TRIGGER problem_description AFTER INSERT ON problem_description
FOR EACH ROW BEGIN
INSERT INTO log SET Id=NEW.Id,user_name=NEW.user_name;
END;
and have this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax...
Hi,
I have a Django1.1 project that works with a legacy MySQL db.
I'm trying to migrate this project to Oracle (xe and 11g).
We have two options for the migration:
- Use SQL developer to create a migration sql script.
- Use Django fixtures.
The schema created with the sql script from sql developer doesn't match the schema created from ...
Currently I am developing a CakePHP that will list various businesses.
In the database, there is a table for businesses that lists them like so:
id | name | address | city | state | state_id | zip | url
The state column are abbreviations of states (for listing purposes) CA, AK, FL, etc and the state_id matches up with the id...
Im using a sequel for search like this using PDOs
$states = "'SC','SD'";
$sql = "select * from mytable where states in (:states)";
$params = array(':states'=>$states);
and I use my function
$result = $this->selectArrayAssoc($sql, $params);
where my selectArrayAssoc function as following
public function selectArrayAssoc($sql, $params...
dear all,
i want to fire a trigger after my table has been filled woth reords ,i dont want to fire a rowwise trigger.please tell how can we do that in mysql.
...
I have a table with three filled columns named "Name", "City" and "Occupation".
I want to create a new column in the same table that contains the number of people who have the same occupation.
"Name" | "City" | "Occupation"
------------------------------
Amy | Berlin | Plumber
Bob | Berlin | Plumber
Carol | Berlin | Lawyer
David ...
"ALTER TABLE tablename AUTO_INCREMENT = 10000000 "
taking long time to update. why? i need to get optimize this query. Please help
...
In my MySQL database, I have the following column type.
Field | Type | Null |
----------------------------------
Column_priv | set('Select','Insert','Update','References') | No |
And I cannot figure out what to map this to.
Can anyone tell me how I can map this to something?
...
Are there any performance difference between decimal(10,0) unsigned type and int(10) unsigned type?
...
Hi Guys,
I have PEAR, MDB2 and Mysql Driver installed however I keep getting:
Fatal error: Call to undefined function: MDB2_Driver_mysql::_isNewLinkSet(). in /home/**/PEAR/MDB2.php on line 1937.
The Server is CentOS
I am stuck, any help would be appriciated.
Thanks :)
...
I need to update multiple rows with different values.Is it possible to do in mysql?
ie,some thing like this
UPDATE landing_page SET (rotation_slot_begin='0',rotation_slot_end='0.333333333333' where landing_pageid=265),(rotation_slot_begin='0.333333333333',rotation_slot_end='0.666666666667' where landing_pageid=267),(rotation_slot_begin=...
Hi,
I have a media server logging to a mysql database and it records a seperate row for each connect, play, stop, disconnect event. What I would like to do is find connect events that do not have a related disconnect event or play events that do not have a related stop event.
date time category event clientId ...
Hi,
I want to make a script that will list online users when they enter a page.
Simple way is record newly entered users into MySQL and list them for example every second.
But I don't think it's a good idea with tons of users like in a facebook app come in and out of the page.
There would be a way with Flash and PHP sockets but I really ...
I have a number of users which are logged in at a time in my desktop application.
They are working on the same table (create, read, update, delete data) so I have to update their views, to reflect changes, every few seconds - currently I am thinking to use a different thread to do that.
I am using the MySQL database engine.
Is there ...
hey,
i downloaded two databases off the mysql site (classicmodels and sakila). after running a few queries, i'm puzzled.
the table orderdetails in classicmodels db has rougly 3k rows.
when i search for one row (using different columns, i get these results):
primary key:0.0027s
other columns:0.0042s and 0.0054s
the table rental in t...
I have 2 tables - one storing user information (id, username, password) and the second one storing information about events (id, name, description, date, username(represents the user who created the event)). I would like to implement 'favourite events' functionality. This would allow the user to store his favourite events and later displ...
Hi All,
I'm trying to determine which my.cnf mysql is using. Is there a command or something for mysql or mysqladmin that shows which one is being loaded?
...
I have the following tables (removed columns that aren't used for my examples):
CREATE TABLE `person` (
`id` int(11) NOT NULL,
`name` varchar(1024) NOT NULL,
`sortname` varchar(1024) NOT NULL,
PRIMARY KEY (`id`),
KEY `sortname` (`sortname`(255)),
KEY `name` (`name`(255))
);
CREATE TABLE `personalias` (
`id` int(11) NOT NU...
I would like to get the schema name string of a stored proc inside the stored proc itself. I don't know if it's possible because I didn't find any information about it.
Exemple :
DELIMITER $$
DROP PROCEDURE IF EXISTS `exemple` $$
CREATE DEFINER=`root`@`%` PROCEDURE `exemple`()
BEGIN
DECLARE schema_name VARCHAR(100) DEFAULT NULL;
S...