I am joining multiple tables in a MySQL query, and the execution of this query is very slow. I badly need to improve the execution time!
I did some optimization, but still it loads slowly. Any suggestions?
...
hi!
i've a sql table with 3 columns: id, start, end
i've to select all(SELECT *) the results and arrange them descending from the (start-end) value..
can i do that in a single sql command?
any help?
...
I have a table named 'role'
id | parent_id | name
---+-----------+--------------------
1 | NULL | Machine
2 | 3 | Ram
3 | 4 | Cpu
4 | NULL | Computer
5 | NULL | Electronic Device
I need a (mysql or postgress sql) query which will give the possible parents of a particular role.
For example
the p...
My mysql connection setting:
<?php
mysql_connect("fanyer.fatcowmysql.com", "test_username", "test_password") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("fanyer_database") or die(mysql_error());
echo "Connected to Database";
?>
This is working perfectly.. Now i am using this in doctrine bootstra...
I'm trying to connect to a mysql server at dreamhost from a php scrip located in a server at slicehost (two different hosting companies).
I need to do this so I can transfer new data at slicehost to dreamhost. Using a dump is not an option because the table structures are different and i only need to transfer a small subset of data (100-...
Hey there,
I'm trying to find a free downloadable dictionary (or Corpus might be the better word) which I can import into MySQL. I need to words to have the type (noun, verb, adjective) associated with them. Any tips on where I can find one? I found one several years ago that worked nicely, but I no longer have it around.
Thanks!
Chris...
I have created a class which name is Manager and I have a Frame which name is BirthList and this frame has a table.I work with MySQL and I have entered some data in the "birthtable" in MySQL.and i want to add those data from MySQL table in to the table which is in my frame .
HINT: birthList is a list of Birth objects.
but I will find thi...
Hi, can some explain to me how the database design would look like for the following approach:
let's say there are two tables 'toys' and 'wishlist'. Every wishlist has one toy, but 'toys' doesn't contain all the toys there are in the world. To prevent unhappy children lets add a row to toys called 'miscellaneous' so they can specify the ...
Hi i have the below table datas
id parent_id name
1 Machine
2 3 Ram
3 4 Cpu
4 Computer
5 6 food1
6 food2
My need is to select possible parents
for example
1) if we select 'machine' all others can parents
2) if we select 'cpu' then '...
hi There,
I can't get on the right track with this, any help would be appreciated
I have one table
+---+----------+---------+-----------+
|id | match_id | team_id | player_id |
+---+----------+---------+-----------+
| 1 | 9 | 10 | 5 |
| 2 | 9 | 10 | 7 |
| 3 | 9 | 10 | 9 |
| 4...
I want to join a pages table and menu table.
CREATE TABLE IF NOT EXISTS `pages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`keywords` varchar(255) NOT NULL DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
`path` varchar(255) NOT NULL DEFAULT '',
`content` text NOT NULL,
`sta...
My Data has "enter" mark in one of the columns. How do I remove it and display the text on a single line? phpMyAdmin does show that word on 2 lines.
...
I am trying to create stored procedure in mysql admin. I am hosting a website in POWWEB.com. For this purpose i am trying to create stored procedure in mysqladmin.
The Mysql version is 5.0.45. I am able to create a stored procedure with only
1 line of code.
CREATE PROCEDURE TEST(input INT)
INSERT INTO TEST(COL1) VALUES(input...
hi!!
i've to display the differences between a column(reg_time) in mysql and the present time so that the final output (after some php to display in minutes or seconds or hours or days)
be:
Registered : 8 hours ago.
is there any function to do that?
thanks
...
$sql = "UPDATE galleries SET name='$name', desc='$desc', mainthumb='$mt'
WHERE id='$id'";
this throws an error for some godforsaken reason. I must be way too tired because I don't see it.
I've confirmed that all the values are being posted. What's worse, it's an almost exact copy any query that works fine.
Update:
This has ...
CREATE TABLE accounts (
account_name VARCHAR(100) NOT NULL PRIMARY KEY
);
CREATE TABLE products (
product_id INTEGER NOT NULL PRIMARY KEY,
product_name VARCHAR(100)
);
CREATE TABLE bugs (
bug_id INTEGER NOT NULL PRIMARY KEY,
bug_description VARCHAR(100),
bug_status VARCHAR(20),
reported_b...
Hi, we have been using TurboDBAdmin (an ajax tool) so users of CMS websites can administer their data (it saves us writing a CRUD application each time) and is very easy to install and users like the Excel type interface however it has several limitations and is not now supported. Tools like this are a bit more modern and have further f...
such as "order by col_location", if location is the same, then "order by col_time"
...
When I write 'SELECT * FROM table ORDER BY RAND() LIMIT 50' mysql has to randomize the entire table then only fetch 50.
What I want to do (in mysql, preferably not in php) is to fetch 50 rows THEN randomize them.
Is there a way to do this in Mysql?
...
Hello Stackoverflowers,
I'm a MySQL beginner.
Does anybody know what the sql statment is to read how many recods their are in a MySql database?
I don't want to display the records i just want to know how many records their are in my table.
Thanks
DJ
...