Search Results

Search found 224 results on 9 pages for 'om the eternity'.

Page 3/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • How can i Rollback for files/folders corresponding to the changes done?

    - by OM The Eternity
    I am using PHP and Mysql I have PHP script in which I rollback all the data in the database such data all the old value be reset to the database if update is done, and all new value gets deleted if new insert has been done. Now my goal is to perform the same process with files/folders associated with the changes done, I am not able to create an idea for doing the rollback job with the files/folders associated with the Changes.. So can anyone of u help me or direct me to get the best idea?????

    Read the article

  • Recursive function for copy of multilevel folder is not working.

    - by OM The Eternity
    Recursive function for copy of multilevel folder is not working. I have a code to copy all the mulitilevel folder to new folder. But in between I feel there is problem of proper path recognition, see the code below.. <?php $source = '/var/www/html/pranav_test'; $destination = '/var/www/html/parth'; copy_recursive_dirs($source, $destination); function copy_recursive_dirs($dirsource, $dirdest) { // recursive function to copy // all subdirectories and contents: if(is_dir($dirsource)) { $dir_handle=opendir($dirsource); } if(!is_dir($dirdest)) { mkdir($dirdest, 0777); } while($file=readdir($dir_handle)) {/*echo "<pre>"; print_r($file);*/ if($file!="." && $file!="..") { if(!is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file); } else{ copy_recursive_dirs($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest); } } } closedir($dir_handle); return true; } ?> from the above code the if loop has a copy function as per requirement, but the path applied for destination here is not proper, I have tried with basename function as well.. but it didnt got the expected result.. below is the if loop i am talking about with comment describing the output... if(!is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { $basefile = basename($dirsource.DIRECTORY_SEPARATOR.$file);//it gives the file name echo "Pranav<br>".$dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file;//it outputs for example "/var/www/html/parth//var/www/html/pranav_test/media/system/js/caption.js" which is not correct.. copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file); } as shown above the i cannot get the files and folders copied to expected path.. please guide me to place proper path in the function....

    Read the article

  • My Pop window displays Horizontal scroller, how to remove it?

    - by OM The Eternity
    My Pop window displays Horizontal scroller, how to remove it? I am using Mozilla 3.6.3, PHP in Windows, I have an anchor tag with href as given below: <a href="javascript:popupWindow('http://example/english/images/buttons/button_invoice.gif"></a> but when I click on this link my pop window is displayed with a horizontal scrollbar.. so help me to remove this horizontal scroll bar...

    Read the article

  • javascript error of unterminated string

    - by OM The Eternity
    I want pass a parameter of javascript functiona which is a string. This javascript function is a hintbox on mousehover.. and the string i am using is like this: Hemmed Finish: Every side/edge (1/2" to 2") of the banner are folded and glued (special vinyl solution) or heat pressed. This is the most common and best finish option. Stitched Finish: Every side/edge (1" to 2") of the banner are folded in the back and stitched/sewed with white thread. This is not a common option as thread can be seen on the banner. Now in the hintbox on mousehover the above given text has to be display as it is displayed above along with the paragraph break.. But when i pass the above as parameter in that function along with appending some backslashes to recognise some punctuation, iots till gives me javascript error of unterminated string... I am doing this: onMouseover="showhint('Hemmed Finish\: Every side/edge \(1/2\'\' to 2\'\'\) of the banner are folded and glued \(special vinyl solution\) or heat pressed. This is the most common and best finish option.Stitched Finish\: Every side/edge \(1\'\' to 2\'\'\) of the banner are folded in the back and stitched/sewed with white thread. This is not a common option as thread can be seen on the banner', this, event, '250px')" pls could u help me in rectifying the issue...

    Read the article

  • How to display records below form on submission in php without the use of database?

    - by OM The Eternity
    I have a form with multiple fields in it along with a image input field, just below the form i have a list to be displayed on every submit of this form... this has to be done without the use of DB.. I think this can be achieved by using session but its not working with me, as evrytime page gets refreshed and session gets recreated/reset.. Please help me in resolving this issue

    Read the article

  • How to display records below form on submission in php without the use of database?

    - by OM The Eternity
    How to make the use of hidden variables as array for consecutive submission of data so that they can be used to display the records list. I have a form with 4 text fields and a file upload field.. as i submit he form it should get appended to the list which needs to be displayed below the form, such that these values are NOT stored in the DB.. So in this case how can i use the post array to collect the data and display in the list below?

    Read the article

  • get me the latest Change from Select Query in below given condition

    - by OM The Eternity
    I have a Table structure as id, trackid, table_name, operation, oldvalue, newvalue, field, changedonetime Now if I have 3 rows for the same "trackid" same "field", then how can i select the latest out of the three? i.e. for e.g.: id = 100 trackid = 152 table_name = jos_menu operation= UPDATE oldvalue = IPL newvalue = IPLcccc field = name live = 0 changedonetime = 2010-04-30 17:54:39 and id = 101 trackid = 152 table_name = jos_menu operation= UPDATE oldvalue = IPLcccc newvalue = IPL2222 field = name live = 0 changedonetime = 2010-04-30 18:54:39 As u can see above the secind entry is the latest change, Now what query I should use to get the only one and Latest row out of many such rows... $distupdqry = "select DISTINCT trackid,table_name from jos_audittrail where live = 0 AND operation = 'UPDATE'"; $disupdsel = mysql_query($distupdqry); $t_ids = array(); $t_table = array(); while($row3 = mysql_fetch_array($disupdsel)) { $t_ids[] = $row3['trackid']; $t_table[] = $row3['table_name']; //$t_table[] = $row3['table_name']; } //echo "<pre>";print_r($t_table);echo "<pre>"; //exit; for($n=0;$n<count($t_ids);$n++) { $qupd = "SELECT * FROM jos_audittrail WHERE operation = 'UPDATE' AND trackid=$t_ids[$n] order by changedone DESC "; $seletupdaudit = mysql_query($qupd); $row4 = array(); $audit3 = array(); while($row4 = mysql_fetch_array($seletupdaudit)) { $audit3[] = $row4; } $updatefield = ''; for($j=0;$j<count($audit3);$j++) { if($j == 0) { if($audit3[$j]['operation'] == "UPDATE") { //$insqry .= $audit2[$i]['operation']." "; //echo "<br>"; $updatefield .= "UPDATE `".$audit3[$j]['table_name']."` SET "; } } if($audit3[$j]['operation'] == "UPDATE") { $updatefield .= $audit3[$j]['field']." = '".$audit3[$j]['newvalue']."', "; } } /*echo "<pre>"; print_r($audit3); exit;*/ $primarykey = "SHOW INDEXES FROM `".$t_table[$n]."` WHERE Key_name = 'PRIMARY'"; $prime = mysql_query($primarykey); $pkey = mysql_fetch_array($prime); $updatefield .= "]"; echo $updatefield = str_replace(", ]"," WHERE ".$pkey['Column_name']." = '".$t_ids[$n]."'",$updatefield); } In the above code I am fetching ou the distinct IDs in which update operation has been done, and then accordingly query is fired to get all the changes done on different fields of the selected distinct ids... Here I am creating the Update query by fetching the records from the initially described table which is here mentioned as audittrail table... Therefore I need the last made change in the field so that only latest change can be selected in the select queries i have used... please go through the code.. and see how can i make the required change i need finally..

    Read the article

  • Mulitple variable containing "for loop" is not working in my code...

    - by OM The Eternity
    Below is the code I am working with and the last for loop i am iterating is not working... I think i am doing something wrong using multiple variable in a for loop,also I m aware of the fact that it can be done. $updaterbk = "SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrail j2 ON ( j1.trackid != j2.trackid AND j1.field != j2.field AND j1.changedone < j2.changedone ) WHERE j1.operation = 'UPDATE' AND j2.id IS NULL "; $selectupdrbk = mysql_query($updaterbk); while($row1 = mysql_fetch_array($selectupdrbk)) { $updrbk[] = $row1; } foreach($updrbk as $upfield) { if(!in_array($upfield['field'],$exist)) { $exist[] = $upfield['field']; $existval[] = $upfield['oldvalue']; //echo $updqueryrbk = "UPDATE `".$upfield['table_name']."` SET "; } } print_r($existval); for($i=0;$j=0;$i<count($exist);$j<count($existval);$i++;$j++) { $updqueryrbk.= $exist[$i]['field']."=".$existval[$j]['oldvalue'].","; $updqueryrbk.="="; $updqueryrbk.= $existval[$j]['oldvalue']; $updqueryrbk.=","; }

    Read the article

  • is it correct to unset the session variable for a particular index as the vay whole session is made

    - by OM The Eternity
    is it correct to unset the session variable for a particular index as the vay whole session is made unset in PHP? I know this works: unset($_SESSION['bannersize']) But does this works ? : unset($_SESSION['bannersize'][3]) or is there any other way to unset any particular desired index of the session and then again rearrange the values inside it to remove the empty index..?

    Read the article

  • need export query rather than creating file for mysqldump without triggers.. See description

    - by OM The Eternity
    I have code as $db_name = "db"; $outputfile = "/somewhere"; $new_db_name = 'newdb'; $cmd = 'mysqldump --skip-triggers %s > %s 2>&1'; $cmd = sprintf($cmd, escapeshellarg($db_name), escapeshellcmd($output_file)); exec($cmd, $output, $ret); if ($ret !=0 ) { //log error message in $output } Then to import: $cmd = 'mysql --database=%s < %s 2>&1'; $cmd = sprintf($cmd, escapeshellarg($new_db_name), escapeshellcmd($output_file)); exec($cmd, $output, $ret); //etc. unlink($outputfile); Bow here what should i do to get the export query, rather than creating a file everytime?

    Read the article

  • Error in configuration file

    - by OM The Eternity
    I have copied my project folder from my live server to my local host and edited the config file as per localhost, but still i am displayed with the "Internal Server Error:500" The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. I cannot understand what should be the problem here, please help me to track the issue here....

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >