7,368 Topics

Member Avatar for
Member Avatar for kvdd

hello, I try the following query: [code=mysql] SELECT IF TIME(hour_end) > '21:00:00' THEN timediff(time(hour_end),'21:00') AS diff ENDIF FROM `hours` [/code] Why whould this not work? Any help would be appreciated.

Member Avatar for tesuji
0
114
Member Avatar for eva_blue

Hello to all, I am quite new to sql, and so the time has come that I don't understand why a query has a certain output.I apologise for the long post but I'd rather describe exactly what I am doing in, hoping that someone can spot the problem that I …

Member Avatar for tesuji
0
77
Member Avatar for bajanstar

Hi Guys, This is my problem: In the below table: donor receptor 1 -> 4 2 -> 5 4 -> 6 The above reads as follows... Student 1 donates all of his/her money to Student 4 Student 2 donates all of his/her money to Student 5 Student 4 donates all …

Member Avatar for tesuji
0
95
Member Avatar for dhandapanik

Hi, I am working in a finance project where each transaction table is having more than 4 Million records just for 3 months. I have user & branch related information on other tables. I wrote a joined query by joining around 5 tables to summarize the report based on Branch, …

Member Avatar for dhandapanik
0
126
Member Avatar for Venom Rush

Hi all Is it at all possible to do this? I have a number of records that I need to recover. Any help would be greatly appreciated

Member Avatar for varmadba
0
88
Member Avatar for tuse

In most of my VB.NET applications, I connect to MySQL databases using the MySQL ODBC Driver. Recently, I got to know about the MySQL Connector (again provided by MySQL). Which one is better in terms of- a. Performance b. Security

Member Avatar for mwasif
0
50
Member Avatar for DickDeeds

I have version 5.0.27 of MYSQL and when attempting to use AES_ENCRYPT I get the error: Call to undefined function AES_ENCRYPT() Here is a copy of a test query: $sql .=$name[$i] ."='".AES_ENCRYPT($assign[$xx],"36LKFOIREI#"); Can anyone help? tia Dick Deeds

Member Avatar for mwasif
0
56
Member Avatar for myzyzy

I am currently testing replication on mysql 5.0.9 running on Win XP Pro on 2 servers , one as a master , and another as slave , basic master-slave configuration. The slave have 2.5 GigaB of RAM,300GB SATA2 HD & on Intel 2.4ghz Core Duo and the master have 1 …

Member Avatar for mwasif
0
76
Member Avatar for johnkeating

I am a new convert to MySQL. It sounds like an answer to my prayers, BUT when I look for some training I find the cost to be substantial. I have purchased a book Beginning MYSQL by WROX but I now realize that I need some more structured training. I …

Member Avatar for stephen84s
0
101
Member Avatar for kvdd

Hello, I try with the following query to calculate the working time of employees: [code=mysql] SELECT TIME_FORMAT( ADDTIME( TIMEDIFF(TIMEDIFF(hour_end, hour_begin),(hour_pause)), TIMEDIFF(TIMEDIFF(hour_end_o, hour_begin_o),(hour_pause_o)) ) ,'%H:%i' ) AS total FROM hour [/code] This works correct, if the pause is filled, if no pause is given, no total is displayed (NULL). How can …

Member Avatar for kvdd
0
102
Member Avatar for kvdd

Whats wrong with this query? [code=mysql] TIME_FORMAT( DATE_ADD ( TIMEDIFF(TIMEDIFF(u.hour_end, u.hour_begin),(u.hour_pauze)), TIMEDIFF(TIMEDIFF(u.hour_end_o, u.hour_begin_o),(u.hour_pauze_o)) ) ,'%H:%i') AS total, [/code] I get the error: [QUOTE]#1305 - FUNCTION system.DATE_ADD does not exist [/QUOTE] BTW: I am using version 5.0.51a.

Member Avatar for kvdd
0
3K
Member Avatar for shadwickman

Hi, I couldn't get this to work, but I was using a PHP script to go through the rows in a table in my database and if it found a specific value, to delete that row. However, it deletes ALL the rows no matter what I do and throws an …

Member Avatar for nav33n
0
690
Member Avatar for dannyd

At our television station we have a schedule of shows that need to be aired (stationschedule) and shows that have aired confirmed by our on air system (asrunlogs). What I'd like to do is compare both tables against eachother to see if there are any major differences. Both tables have …

Member Avatar for tesuji
0
85
Member Avatar for sqldba

Hi , I am a newbie. I want to create a user and grant enough permission to backup a database. Also , i want to Create a daily backup schedule and select to perform daily incremental and weekly full. Please help me to do this using MYSQL script(MYSQL query Browser). …

0
51
Member Avatar for daniyalnawaz

hi, i have a table called exam, it has following columns ----------------------------------------------------------------- | ID | QUESTION | OPTION_1 | OPTION_2 | OPTION_3 | ----------------------------------------------------------------- now I've normalized it and put the exam options in another table called 'exam_option' table which keeps these options in rows instead of columns. Since i …

Member Avatar for tesuji
0
110
Member Avatar for sushilchandu
Member Avatar for sreein1986
0
124
Member Avatar for AdamGr

This must be a pretty newbie mistake, but I'm still flummoxed by it. I created a very simple procedure: [code] create procedure deleteAll () begin delete from test1; delete from test2; end [/code] but when I run it I get a Error code -1: Error executing SQL command. The strangest …

Member Avatar for tesuji
0
58
Member Avatar for dispy

Good day :) <<== new, please excuse If I post shit :) I've one query which doesn't work: [CODE] SELECT conquer.timestamp AS time, conquer.new_owner AS new_owner_id FROM de12_conquer AS conquer INNER JOIN de12_tribe AS conqueror ON conqueror.id=conquer.new_owner INNER JOIN de12_tribe AS loser ON loser.id=conquer.old_owner WHERE (conquer.timestamp>0 && conquer.timestamp<1213647029734) AND (conqueror.ally=37038 …

Member Avatar for dispy
0
75
Member Avatar for s_susanta

Hi, I am novice in PHP & Mysql. I am facing a problem when I put a command in Mysql the following error is showng. Please help me to solve this problem. Mysql> create database xx; ERROR 1044(42000):Access denied for user ' '@localhost' to database 'xx' Thanks Susanta

Member Avatar for varmadba
0
48
Member Avatar for sankar62

what r the types of mysql backups..>?.. please explain.. what is meant by [COLOR="Red"][B]point in backup[/B][/COLOR]???

Member Avatar for varmadba
0
40
Member Avatar for veledrom

Hi, I have 2 tables "name1_" and "name_2". I want to compare them. If name in "name_1" table is same as name in "name_2" table, then copy whole row into other table "name_3". Thanks

Member Avatar for varmadba
0
46
Member Avatar for veledrom

Hi guys, How can i convert code below into INNER JOIN style. Thanks [code] UPDATE def_1 SET Valid = 'Yes' WHERE id IN (SELECT id FROM def_2) AND paid IN (SELECT paid FROM def_2) AND valid IS NULL [/code]

Member Avatar for varmadba
0
76
Member Avatar for veledrom

Hi, [code] INSERT INTO table1 (supid, paid) VALUES ( (SELECT supid FROM def_1 WHERE id IN (SELECT id FROM def_2)), (SELECT paid FROM def_1 WHERE id IN (SELECT id FROM def_2)) [/code] This code returns more than 1 value, teherefore i can not execute it. Is there any other way …

Member Avatar for tesuji
0
85
Member Avatar for chicago1985

Does a Database driver come with MySQL 4.0.1 database download? Or do I have to download additional software to get the ODBC driver?

Member Avatar for tesuji
0
103
Member Avatar for veledrom

Hi, [code]select id, pay from def_1 where id = (select id from def_2) and pay = (select pay from def_2)[/code] This generates an error "Subquery returns more than 1 rows". Where is mistake? Thanks

Member Avatar for veledrom
0
82
Member Avatar for cam875

Ok, My sql server has a table called Locations which has the information on what creatures are located in what zone and how many creatures are in the zone. In the creatures table it has the creature I.D. name, and all its stats along with how long it takes to …

0
60
Member Avatar for johnrulz2003200

Hello, I had a forum which had many members but due to some unfortunate circumstances, the website went offline. Anyway, I am again trying to construct a forum. And I was wondering whether it would be possible to transfer the members from my past website (which ran on xoops) to …

Member Avatar for Oldiesmann
0
87
Member Avatar for punithapary

Hi , Can anyone tell me is there any other connection method(mysql with php) other than this.Please help me.. [code=php] $hostingname="localhost"; $username="root"; $password=""; $dbname="test"; $rr=mysql_connect("$hostingname","$username","$password")or die(mysql_error()); mysql_query($rr); mysql_select_db($dbname) or die(mysql_error());[/code] thanks Punithapary

Member Avatar for pritaeas
0
84
Member Avatar for guruOfCool

Hi all, We're implementing a web-based database application for keeping track of employee emergency information. I need a sql query to select a row, but leave out any fields that are empty (but not null). I've got it working so that all fields in a row are selected. The problem …

Member Avatar for stephen84s
0
84
Member Avatar for s_susanta

im Indian a novice and in php. I installed the wamp server2 that has the apacheserver,phpmyadmin and mysql but when I try to connect mysql through PHP code a error message - "Warning : Mysql_connect()[function.mysql.connect]; Access denied for user ' '@'localhost'(using password YES) in c:\wamp\www\school\temp.php on line 10." is comming …

Member Avatar for stephen84s
0
99

The End.