10,946 Topics
![]() | |
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 … | |
Hi all, i am getting `Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\xampp\htdocs\demo\help.php on line 23` this error. how to overcome by this problem, <?php include 'database.php'; $email = $_POST; $firstname = $_POST ; $lastname = $_POST ; $tphone = $_POST.$_POST.$_POST ; $message = $_POST; … | |
I'm uploading files via php script straight to a folder called 'uploads' on my mysql server. I can list all the files uploaded. My problem is listing only selected files from this folder for each user that login. i.e. user A logs in with username 'theboss' The user will be … | |
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. | |
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 … | |
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 … | |
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). … | |
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 … | |
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 … | |
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 … | |
Hi everyone and thanks for reading. I've been making a news section for a client's site and now I'm trying to make a little box for the front page to show the five latest stories. Everything is fine in that aspect; I know about using the LIMIT keyword in the … | |
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 | |
what r the types of mysql backups..>?.. please explain.. what is meant by [COLOR="Red"][B]point in backup[/B][/COLOR]??? | |
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 | |
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] | |
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 … | |
Hi, i am having problems displaying the second page of search results. I have applied similar code to a view all logs page which works perfectly but i am having problems making it work with search results. I think it might be a problem with $searchString, not sure??? Please help … | |
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? | |
Hello everyone, I'm sure this has a quick answer/fix but I can't seem to figure out how to store a checkbox value to mysql. And I'm not sure what type I should be saving it as in the field on mysql(like bool, int, varchar). I have 14 check boxes and … | |
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 | |
I am currently trying to convert a program I just wrote to application form, on the Mac. I'm using py2app to accomplish this, and everything works fine up until the last stage; when I try to complete the conversion with: [code] python setup.py py2app [/code] and then run the resulting … | |
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 … | |
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 … ![]() | |
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 | |
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 … | |
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 … | |
Hi everyone, and thanks for reading. I've a client who will be wanting an events/news section for their website and I have a question about handling this information from a database. Lets say that the table consisted of: [CODE] story_id - To make each story unique. title - The title … | |
Hey, i've got a problem, i'm trying to make a drop down box but so that the first value chosen automatically updates the fields that you can choose in the second drop down menu. Yes this may seem easy, but the thing is that each values need to be populated … | |
I'm having a problem with displaying my profile images from a database .the upload works fine,but no image is displayed:Could you please help! I have the following code which cant work: 1. main profile page has the following script: <?php echo '<img src="XXXXX_XXX.php?id=$Current_Person_Id">'; --------------------------------------------------------------------------------- 2.the image page has the following … | |
Sorry for how stupid this question may sound but I am in the process of linking two different warehouses together that use different databases. I need to run a query from one that is a remote webserver as well running PHP with a MYSQL database. This query will be done … | |
I have 2 tables: an IP Address table, and an IP Ranges table. I want to retrieve a list of ranges in the ranges table for which one or more of the IP addresses in the IP address table fall within that range. The IP addresses are represented as integers, … | |
hi all, how can we have a select satement in an SP?(i want to return a result set from the SP). i want to migrate from SQL Server to MySQL and i don't know what to do with these SPs. it can be done in MySQL client, but it gives … | |
Hi friends, I think the MySql is not case sensitive for selecting values. for example I am having a table called dept, Id | Depart 1 | BTECH 11 | it 12 | ibt 2 | BE 21 | cse 22 | ece Now i want to select the capital … | |
Hello, i'm a newbie here and i just want to ask if what is the best distro in running PHP, MySQL, Apache? counting on your replies. thanks :) | |
Hello all, i have got an issue with a client here, who is running an internal CRM system. we need to get information into our Webserver (Linux-MySQL5) database (dealer lists, product lists, ....) and this information is stored in the CRM. but the CRM is Windows-MSsql. The output is .DAT … | |
I have just started using DB2 and have been re-introduced to SQL. I want to make sure I post in the right forum with some questions regarding SQL and some basic scripts I have been given - please, let me know if this is not the place. Also, anyone have … | |
Hi I am unable to connect mysql server through jar execution file. But when I am trying to connect through java class file directly(instead of putting in jar file), it is very well connected. I am not able to understand where I am wrong. Please help. | |
Hi, I'm struggling to get a relatively simple PHP/MySQL script to work. Basically, I've got two tables populated with entries from a database. However I'm getting errors on the second table [icode]mysql_num_rows(): supplied argument is not a valid MySQL result resource [/icode] and [icode]mysql_fetch_array(): supplied argument is not a valid … | |
I am using MySQL 3.23.58 on FC2 I ran PhpMyAdmin >> Runtime Information and it said that "Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based. " My existing my.cnf looks like this: [CODE] [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock set-variable … | |
Hello all, I am wanting to structure a database that will allow for multiple prices per products. I also want to be able to upload an image and enter details about the product. My initial thought would be to have a product_db and have a price table, a product table, … | |
Hi, I'm struggling to get a relatively simple PHP/MySQL script to work. Basically, I've got two tables populated with entries from a database. However I'm getting errors on the second table [icode]mysql_num_rows(): supplied argument is not a valid MySQL result resource [/icode] and [icode]mysql_fetch_array(): supplied argument is not a valid … | |
I'm sorry but I'm totally new on Web Development, I'd like to make a registration form for everyone that downloads a file I have on a Website. The ideal thing would be to send a confirmation email where the link to file is attatched. So basically when a person wants … | |
Hi, I have created one table in MySQL database. I want to use that table in my C sharp application through ODBC. I have installed the ODBC driver also. I have created the project in visual C#, Smart device and WINCE 5.0. Now i want my application will interact with … | |
[code]if(isset($_SESSION['admin']) == TRUE){echo "<font face='tahoma' color='#ff0000'>ADMIN : ".$_SESSION['admin']." welcome<br></font>";} $sql="SELECT * FROM messages WHERE messages.user_id=" .$_SESSION['userid']. ";"; $result=mysql_query($sql); [COLOR="Red"]$numrows=mysql_num_rows($result);[/COLOR][/code] for the previous code the browser show me this message: [COLOR="Green"]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/e3lan3.freehostia.com/header.php on line 9[/COLOR] and line 9 is the … | |
hi all. i can't write to mysql database in jsp so please send some simple example regards bayarja. | |
[B]Hi All[/B] 2 db servers replication interval in every 60 secs right now needs to have length interval ncreased is this o.k. to do - pro's and cons of this Thanks for ur time and help.............. | |
hello sir... from our office we are using wamp for our mysqlserver... but i wanted to be connected to my sitemate database only changing the MysqlHost address.. username and also the password... the problem is i cant connected to it.. maybe u already incounter this before and im hoping that … | |
Nevermind, I'm a retard. I had phpMyAdmin opened to the live server, not the testing server which is still empty. I need a drink. | |
The End.