[Solved] How to SUM Datetime per column

AS some of your logstep_* columns value is NULL so try like this with ifnull, I’ve added only three columns you can try with all of your columns. Hope this will help you. select SEC_TO_TIME( UNIX_TIMESTAMP(ifnull(logstep_1, 0)) + UNIX_TIMESTAMP(ifnull(logstep_2, 0)) + UNIX_TIMESTAMP(ifnull(logstep_3, 0)) ) as logstep_sum_in_time from log_step 2 solved How to SUM Datetime per … Read more

[Solved] Why am I getting Uncaught Error: Syntax error, unrecognized expression in my JavaScript? [closed]

You should pass the nonce parameter with a valid nonce, when the server side code is called. For example, assuming you’ve implemented your code into JavaScript file that you are including using the function wp_enqueue_script wp_enqueue_script( ‘my_js_file’, ‘http://www.yourwebsitedomain.com/your_js_file.js’); As the nonce must be generated in the server side you should call the wp_localize_script function to … Read more

[Solved] How do i edit home page of magento

First please check from where the content of the home is come from. you can you template path for it. if its comes from CMS Page you can edit form the admin CMS page. if its a comes from Static block you can change it from the CMS blocks in admin. and if its a … Read more

[Solved] Pass a variable through the url bar with PHP to a form [closed]

Your get Variable is wrong. You should also check if the get variable is set. <?php require ‘core.inc.php’; if (isset($_GET[‘id’]) { $id = $_GET[‘id’] if (isset($_POST[‘delete’])) { $answer = $_POST[‘decision’]; if ($answer == ‘yes’) { echo ‘user deleted’; } } echo ‘<h1>Are you sure you want to delete ‘.$id.’?</h1> <form name =”form1″ method =”POST” action … Read more

[Solved] syntax error, unexpected ‘{‘ in php [closed]

Missing closing ) of if. …mysql_real_escape_string($_POST[‘activation’])) ^ here Your code should be: if(isset($_POST[‘submit’])){ if($users->confirmEmail(mysql_real_escape_string($_POST[’email’]),mysql_real_escape_string($_POST[‘activation’]))){ header( ‘Location: login.php?msg=3’ ) ; } else { header( ‘Location: activate.php?msg=1′ ) ; } } I’d recommend to use some IDE that has syntax highlight. Also errors are very descriptive nowadays. unexpected { means that there should be something before it. … Read more

[Solved] $_FILES[“file”][“name”] is returning empty value [closed]

In your case the problem is the following line: header(‘Location: ‘.$redirect); When you first run move_uploaded_file and then make redirection using header function, $_FILES array gets empty, so in next line simple you cannot check $_FILES anymore. In addition I don’t see any point making this redirectrion. When you move_uploaded_file it simple return true on … Read more

[Solved] How big can CMS database be? [closed]

I know this has tons of downvotes, but you can cache your database queries. You can also mimic a CSS file using the header type in PHP. See http://css-tricks.com/css-variables-with-php/ This will allow the browser to cache the CSS file that was generated by PHP & MySQL. This means the database will only be called when … Read more

[Solved] Change all prices (numbers) with 20% on webpage [closed]

Does the following help: var currentMode = 1; var discount = 0.20; var reverseDiscount = 1/(1-discount); function togglePrices() { var prices = document.getElementsByClassName(“price”); for (var i = 0; i < prices.length; i++) { var individualPrice = prices[i].innerHTML.substring(1); if(currentMode == 1) { individualPrice = parseFloat(individualPrice) * (1-discount); } else { individualPrice = parseFloat(individualPrice) * reverseDiscount; } … Read more

[Solved] How To Connect Two Domain [closed]

You would probably use cURL from php. cURL can do so many things, so you can probably google “php curl upload” or something the get more specific answers. But the key-word you are looking for is probably cURL. Please note that if you are going server-to-server, CORS will not make any difference — CORS only … Read more

[Solved] Gather column name of a table from database [closed]

http://php.net/manual/en/function.mysql-num-fields.php $result = mysql_query(“select * from table”); echo ‘<tr>’; for ($i = 0; $i < mysql_num_fields($result); $i++) { echo “<th>”.mysql_field_name($result, $i).”</th>”; } echo ‘</tr>’; 1 solved Gather column name of a table from database [closed]