|
replyarya2u
Rating: 54
Member since: 2008-10-07
Feeds: 1
Categories
|
Preview: Arya Weblog
Arya WeblogColor your imagination with our tools.Last Build Date: Fri, 13 Nov 2009 05:35:32 +0000
What is array and how many type of array?replyarya2u Fri, 13 Nov 2009 05:35:32 +0000 An array is a way of holding multiple closely-related values, such as the test scores of all students in a class. An array is made up of a key and a value, and the key points to the value. There are two types of arrays: Indexed array and Associative array. Their difference is in the way [...]
What does === do? What’s an example of something that will give true for ‘==’, but not ‘===’?replyarya2u Fri, 13 Nov 2009 05:29:47 +0000 “====” means first check the condition & if it return true then assign that value against a variable.
How do you find the Second highest Salary?replyarya2u Fri, 06 Nov 2009 10:33:26 +0000 SELECT MAX( E1.salary ) FROM employee E1, employee E2 WHERE E1.salary < E2.salary
Multiple select and deletereplyarya2u Thu, 06 Aug 2009 07:20:57 +0000 JAVASCRIPT code ———————- PHP code —————– 0 && $_REQUEST['deleteall']==”Delete”) { $cnt=count($_REQUEST['chkmem']); $chkmem=$_REQUEST['chkmem']; for($i=0;$i<$cnt;$i++) { mysql_query(“delete from tbl_name where sid=”.$chkmem[$i]) or die(mysql_error()); } } ?> HTML code ————-
Arrange order or sorting the listingreplyarya2u Thu, 06 Aug 2009 07:14:17 +0000 The PHP Code —————— // if an arrow link was clicked… if ($_GET['dir'] && $_GET['id']) { // make GET vars easier to handle $dir = $_GET['dir']; // cast as int and couple with switch for sql injection prevention for $id $id = (int) $_GET['id']; // decide what row we’re swapping based on $dir switch ($dir) { // if we’re going up, swap is 1 less [...]
Modify or Remove a Sessionreplyarya2u Mon, 03 Aug 2009 05:39:41 +0000 The code above demonstrates how [...]
Sending Email (Text/HTML/Attachments)replyarya2u Sat, 01 Aug 2009 11:16:04 +0000 from = ”; $mail->to = $to; $mail->subject = $subject; $mail->body = “Plese find the attachment.”; if($filename <> “”) { # append the attachment $mail->add_attachment($data, $filename, $content_type); } # send e-mail $enviado [...]
Set session timereplyarya2u Sat, 01 Aug 2009 06:49:17 +0000 session_start(); //SESSION START // set timeout period in seconds $inactive = 600; // check to see if $_SESSION['timeout'] is set if(isset($_SESSION['timeout']) ) { $session_life = time() – $_SESSION['timeout']; if($session_life > $inactive) { session_destroy(); header(“Location: login.php”); } } $_SESSION['timeout'] = time();
Call parent window’s javascript function from child window OR passing data from child window to parent window in javascriptreplyarya2u Wed, 22 Jul 2009 07:40:12 +0000 Hi, I was working on small application and I had a requirement as described here. I was creating a page in which user can add multiple cotact detail for him. The page has facility for add, delete and edit the contact. I was storing all these information in view state and finally on Save All [...]
Convert array to comma separated stringreplyarya2u Wed, 22 Jul 2009 07:36:50 +0000 $aSelectUserId = array(‘mango’, ’orange’, ’papaya’, ’apple’, ’pineapple’); $sCommaAdded = implode( “,”, $aSelectUserId ); echo $sCommaAdded; //OUTPUT >>>mango,orange,papaya, apple,’pineapple
|
|||||||