About 21,412 results: "mysql_query"
Page 2 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On








  1. 
                        
  2. 		mysql_query("INSERT INTO `hs_hr_emp_reportto` VALUES ('012', '011', 1);");
  3. 
                        
  4. 		mysql_query("INSERT INTO `hs_hr_leavetype` VALUES ('LTY010', 'Medical', 1)");
  5. 		// For testStoreLeaveTaken
  6. 		mysql_query("INSERT INTO `hs_hr_leavetype` VALUES ('LTY012', 'Personal', 1)");
  7. 
                        
  8. 		mysql_query("INSERT INTO `hs_hr_workshift` (`workshift_id`, `name`, `hours_per_day`) VALUES (10, 'Test', 6);");
  9. 		mysql_query("INSERT INTO `hs_hr_employee_workshift` (`workshift_id`, `emp_number`) VALUES (10, 15)");
  10. 
                        
  11. 		mysql_query("INSERT INTO `hs_hr_leave_requests` (`leave_request_id`, `leave_type_id`, `leave_type_name`, `date_applied`, `employee_id`) VALUES (10, 'LTY010', 'Medical', '".date('Y-m-d', time()+3600*24)."', '012')");
  12. 		mysql_query("INSERT INTO `hs_hr_leave_requests` (`leave_request_id`, `leave_type_id`, `leave_type_name`, `date_applied`, `employee_id`) VALUES (11, 'LTY010', 'Medical', '".date('Y-m-d', time()+3600*24)."', '011')");
  13. 		mysql_query("INSERT INTO `hs_hr_leave_requests` (`leave_request_id`, `leave_type_id`, `leave_type_name`, `date_applied`, `employee_id`) VALUES (12, 'LTY010', 'Medical', '".date('Y-m-d', time()+3600*24)."', '013')");
  14. 		mysql_query("INSERT INTO `hs_hr_leave_requests` (`leave_request_id`, `leave_type_id`, `leave_type_name`, `date_applied`, `employee_id`) VALUES (13, 'LTY010', 'Medical', '".date('Y-m-d', time()+3600*24)."', '014')");
  15. 		mysql_query("INSERT INTO `hs_hr_leave_requests` (`leave_request_id`, `leave_type_id`, `leave_type_name`, `date_applied`, `employee_id`) VALUES (14, 'LTY010', 'Medical', '".date('Y-m-d', time()+3600*24)."', '013')");

  1. 		if($link){
  2. 			@mysql_query("USE q",$link);
  3. 			# Ici nous supprimons les salons orphelins de mysql
  4. 			$results = mysql_query("SELECT * FROM `channels`",$link);
  5. 					if(!array_key_exists(strtolower($table['name']),self::$channels)){
  6. 						mysql_query(sprintf("DELETE FROM channels WHERE `name`='%s';",$table['name']),$link);
  7. 			$name = mysql_real_escape_string($name);
  8. 			$results = mysql_query(sprintf("SELECT * FROM `channels` WHERE name='%s'",$name),$link);
  9. 				# injection des nouveaux canaux
  10. 				mysql_query(sprintf("INSERT INTO `channels` (`id`,`name`,`created`,`founder`,`adder`,`chantype`,`chanmode`,`chanflags`,`chanlev`,`welcome`,`topic`) VALUES ('%d','%s','%d','%s','%s','%s','%d','%d','%s','%s','%s')",
  11. 				$last = mysql_fetch_assoc($results);
  12. 				if($values['topic']!==$last['topic']){mysql_query(sprintf("UPDATE `channels` SET `topic`='%s' WHERE `name`='%s'",mysql_real_escape_string($values["topic"]),$name),$link);}
  13. 				if($values['welcome']!==$last['welcome']){mysql_query(sprintf("UPDATE `channels` SET `welcome`='%s' WHERE `name`='%s'",mysql_real_escape_string($values["welcome"]),$name),$link);}
  14. 				if($values['chanmode']!==$last['chanmode']){mysql_query(sprintf("UPDATE `channels` SET `chanmode`='%s' WHERE `name`='%s'",$values["chanmode"],$name),$link);}
  15. 				if($values['chanflags']!==$last['chanflags']){mysql_query(sprintf("UPDATE `channels` SET `chanflags`='%d' WHERE `name`='%s'",$values["chanflags"],$name),$link);}

  1. /*						echo $ins_user_det = "insert into user_details(`user_id`, `first_name`,`last_name`,`dob`,`email`) values('".$userId."','".$this->data['User']['first_name']."','".$this->data['User']['last_name']."','".$this->data['User']['dob']."','".$this->data['User']['email']."')";exit();
  2. */						$res_det = mysql_query($updatUserDet);
  3. 					$sql = "update `users` set `user_status` = '1' where `id` ='".$value."'";
  4. 					$res = mysql_query($sql);
  5. 		$qry="update `users` set `user_status`='1' where `id`='".$_REQUEST['id']."'";
  6. 		$res=mysql_query($qry);
  7. 				
  8. 				$userSave = mysql_query("insert into users(id, username, password, user_group_master_id, user_status) values('', '".$this->data['User']['username']."', '".base64_encode($this->data['User']['password'])."', '".$this->data['User']['user_group_master_id']."', '".$this->data['User']['user_status']."')");
  9. 					$qry = "INSERT INTO `user_details` ( `id` , `user_id`, `first_name`, `last_name`, `email`, `dob`, `c_id` )VALUES ('',".$id.",'".$fname."','".$lname."','".$email."', '".$dob."', ".$_REQUEST['country'].")" ;
  10. 					if($res = mysql_query($qry))
  11. 				$usrqry = "insert into users(id, username, password, user_group_master_id, user_status) values('', '".$this->data['User']['username']."', '".base64_encode($this->data['User']['password'])."', ".$this->data['User']['user_group_master_id'].", '".$this->data['User']['user_status']."')";
  12. 				$userSave = mysql_query($usrqry);
  13. 					echo $qry = "INSERT INTO `user_details` ( `id` , `user_id`, `first_name`, `last_name`, `email`, `dob`, `c_id` )VALUES ('',".$id.",'".$fname."','".$lname."','".$email."', '".$dob."', ".$_REQUEST['country'].")" ;
  14. 					if($res = mysql_query($qry))
  15. 				//echo $sql = "delete from `users` where `id` = '".$value."'";exit();
  16. 				$res = mysql_query($sql);




  1. /*						echo $ins_user_det = "insert into user_details(`user_id`, `first_name`,`last_name`,`dob`,`email`) values('".$userId."','".$this->data['User']['first_name']."','".$this->data['User']['last_name']."','".$this->data['User']['dob']."','".$this->data['User']['email']."')";exit();
  2. */						$res_det = mysql_query($updatUserDet);
  3. 					$sql = "update `users` set `user_status` = '1' where `id` ='".$value."'";
  4. 					$res = mysql_query($sql);
  5. 		$qry="update `users` set `user_status`='1' where `id`='".$_REQUEST['id']."'";
  6. 		$res=mysql_query($qry);
  7. 				
  8. 				$userSave = mysql_query("insert into users(id, username, password, user_group_master_id, user_status) values('', '".$this->data['User']['username']."', '".base64_encode($this->data['User']['password'])."', '".$this->data['User']['user_group_master_id']."', '".$this->data['User']['user_status']."')");
  9. 					$qry = "INSERT INTO `user_details` ( `id` , `user_id`, `first_name`, `last_name`, `email`, `dob`, `c_id` )VALUES ('',".$id.",'".$fname."','".$lname."','".$email."', '".$dob."', ".$_REQUEST['country'].")" ;
  10. 					if($res = mysql_query($qry))
  11. 				$usrqry = "insert into users(id, username, password, user_group_master_id, user_status) values('', '".$this->data['User']['username']."', '".base64_encode($this->data['User']['password'])."', ".$this->data['User']['user_group_master_id'].", '".$this->data['User']['user_status']."')";
  12. 				$userSave = mysql_query($usrqry);
  13. 					echo $qry = "INSERT INTO `user_details` ( `id` , `user_id`, `first_name`, `last_name`, `email`, `dob`, `c_id` )VALUES ('',".$id.",'".$fname."','".$lname."','".$email."', '".$dob."', ".$_REQUEST['country'].")" ;
  14. 					if($res = mysql_query($qry))
  15. 				//echo $sql = "delete from `users` where `id` = '".$value."'";exit();
  16. 				$res = mysql_query($sql);


  1. 	//first, organize tables in order
  2. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN product_id INTEGER(11) NOT NULL AUTO_INCREMENT FIRST");
  3. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN model_number VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER product_id");
  4. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN post_id INTEGER(11) NOT NULL DEFAULT 0  AFTER model_number");
  5. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN activate_in_store TINYINT(1) NOT NULL DEFAULT 0 AFTER post_id");
  6. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN title VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER activate_in_store");
  7. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN description TEXT COLLATE utf8_general_ci  AFTER title");
  8. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN specifications TEXT COLLATE utf8_general_ci  AFTER description");
  9. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN price  FLOAT(15,3) NOT NULL DEFAULT 0.000 AFTER specifications");
  10. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN list_price  FLOAT(15,3) NOT NULL DEFAULT 0.000 AFTER price");
  11. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN vat_rate  FLOAT(15,3) NOT NULL DEFAULT 0.000 AFTER list_price");
  12. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN handling_price  FLOAT(15,3) NOT NULL DEFAULT 0.000 AFTER vat_rate");
  13. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN stock_quantity INTEGER(7) NOT NULL DEFAULT 0 AFTER handling_price");
  14. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN weight FLOAT(15,3) NOT NULL DEFAULT 0.000 AFTER stock_quantity");
  15. 	mysql_query("ALTER TABLE ec_product MODIFY COLUMN width DOUBLE(15,3) NOT NULL DEFAULT '1.000' AFTER weight");



  1. $time = time() - ($CONF['LAST_LOGIN_MAX'] * 86400);
  2. $SELECT_USERS = mysql_query("SELECT username, last_login, id FROM users WHERE last_login > '0' AND last_login < '".$time. "' AND active = '1' AND suspended = '0' AND admin_level != 'admin' ", $db);
  3. 	//Suspend account
  4. 	mysql_query("UPDATE records SET disabled = '1' WHERE user_id = '".$USERS['id']."' ", $db);
  5. 	mysql_query("UPDATE users SET suspended = UNIX_TIMESTAMP() WHERE id = '".$USERS['id']."' ", $db);
  6. 	
  7. //Check suspended accounts that have passed LAST_LOGIN_MAX_SUSPEND
  8. $SELECT_USERS = mysql_query("SELECT username, last_login, id, suspended FROM users WHERE last_login > '0' AND active = '1' AND suspended > '0' AND admin_level != 'admin' ", $db);
  9. 		//Delete user hosted domains
  10. 	    $SELECT_USER_DOMAINS = mysql_query("SELECT domain_id FROM records WHERE user_id = '".$USERS['id']."' AND type = 'SOA' ", $db);
  11. 		while ($USER_DOMAINS = mysql_fetch_array($SELECT_USER_DOMAINS)){
  12. //Check users that suspended and notify them that their account will be deleted soon
  13. $SELECT_USERS = mysql_query("SELECT username, last_login, id, suspended FROM users WHERE last_login > '0' AND active = '1' AND suspended > '0' AND admin_level != 'admin' ", $db);
  14. 	//check in users_notifications table 
  15. 	$SELECT_PAST_NOTIF = mysql_query("SELECT * FROM users_notifications WHERE user_id = '".$USERS['id']."' AND type = 'LAST_LOGIN_MAX_SUSPEND' ORDER BY time DESC", $db);
  16.         //SEND EMAIL NOTIFICATION
  17. 		mysql_query("INSERT INTO users_notifications (`user_id`, `type`, `time`) VALUES ('".$USERS['id']."', 'LAST_LOGIN_MAX_SUSPEND' , UNIX_TIMESTAMP() ) ", $db);

Back to Top