Tag Info

New answers tagged

0

pt-table-checksum and its friends are very good at validating that the data is (or is not) the same.


0

Maybe narrow down your code to find where it goes wrong. The following code I have tested with success: <?php $a='55d55a5a706d0917fcc7b103'; $b='newData'; $c='otherData'; $d='1'; $e='2'; $f='3'; $g='4'; $h='5'; $m = new MongoClient( "mongodb://192.168.5.88" ); // connect to ...


1

Data: mysql> select * from sid; +-----+-------+------------+ | Sid | marks | subject_id | +-----+-------+------------+ | 101 | 20 | 3 | | 101 | 25 | 2 | | 101 | 60 | 1 | | 104 | 22 | 3 | | 104 | 45 | 1 | | 104 | 54 | 2 | +-----+-------+------------+ 6 rows in set (0.00 sec) ...


0

I see two problems with $query = "INSERT INTO log (user, timein) VALUES ($user , NOW())"; Problem #1 : You need quotes around $user Problem #2 : You need use timein instead of NOW() Now, you need to make a decision. If you want to supply the time yourself, then the query should be $query = "INSERT INTO log (user, timein) VALUES ('$user','$tin')"; ...


0

You just need to make a simple SELECT: SELECT s s1, s2, s3, s4, s5, s6 FROM db.indextable; SELECT s s7, s8, s9, s10, s11, s12 FROM db.indextable; Or is you want a Dynamic SQL with PREPARE statement: CREATE DEFINER=`root`@`localhost` PROCEDURE `Query`( IN eType INT(1), IN eParameter1 INT(7)) BEGIN ...


0

You could get it using MIN,MAX and WEEKDAY with your actual design: Table: CREATE TABLE `test`.`timeclock` ( `id` INT NOT NULL AUTO_INCREMENT, `user` INT NULL, `timeinout` DATETIME NULL, `type` ENUM('in', 'out') NULL, `function` INT NULL, PRIMARY KEY (`id`) ); Data: insert into timeclock(id,user,timeinout,type,function)VALUES ...



Top 50 recent answers are included