Jump to content

karthikeyan_coder

Members
  • Posts

    201
  • Joined

  • Last visited

    Never

Everything posted by karthikeyan_coder

  1. Hello,     i am using flat file database... the data format is google.com || Google msn.com || MSN file name: data.txt i need to delete a row if the id is first column... let us say.. i need to delte the second row.. by clicking some link like.. deletelink.php?url=msn.com $url = $_GET['url']; now i need to delte the row which starts from $url from my text file... how is it possible? any help..  ???
  2. ohh ok... so i have to convert my script to $today = date("YmdHis"); $sql = "SELECT * FROM `articles` WHERE `date`<='$today'"; Thanks ToonMariner :)
  3. Hello,         i am getting the values from mysql table... that field type is "TEXT" values are most likely "20061028025416" .. i need to check weater this value is lesser than or equal to 20061108025416 how it is possible? once i cast it as (int) then all of my values are tured in to "2147483647 "  Thank you.
  4. Ok Thank you Scliburn,Barry Andrew and Oracle :) just back to development with rand(); :)
  5. Hello,         i want to get some random rows from my table.. here is the query [code]$ sql = "SELECT * FROM `banner` WHERE `AID`='1' AND `ACTIVE`='Y' ORDER BY rand() LIMIT 0,2";[/code] it is for getting two rows... is this will give me different two rows always?? coz im expecting some problems occationally, it gives less no of rows... it may be a problem with rest of my code.. but what do you think about rand() in the mysql query? Thank you.
  6. i need current Hour and Minute in the format 00 to 23 and 00 to 59.. i searched in http://in2.php.net/manual/en/function.date.php [quote]H 24-hour format of an hour with leading zeros 00 through 23[/quote] [quote]i Minutes with leading zeros 00 to 59[/quote] i tried this $k = date("Hi"); echo("$k"); output is... 190753 after each refresh it is just incrementing.. :( I need current Hour and Minute in 00 to 23 hour format and 00 to 59 minutes format... any other way to get??? Thank you.
  7. ohh... ok... how can i make gmt conversions from the actual server time?
  8. here is the two functions for showing time in the format "3:57 pm" [code]function convert_timestamp($timestamp, $timezoneOffset=0) { $replacements = array(  '-' => '', ' ' => '', ':' => ''); $timestamp = strtr($timestamp, $replacements); return $timestamp?mktime( substr($timestamp,8,2), substr($timestamp,10,2) - $timezoneOffset + $GLOBALS['fc_config']['timeOffset'], substr($timestamp,12,2), substr($timestamp,4,2), substr($timestamp,6,2), substr($timestamp,0,4) ):0; } function format_Timestamp($timestamp, $tzoffset) { return gmdate($GLOBALS['fc_config']['timeStampFormat'], convert_timestamp($timestamp, $tzoffset)); }[/code] i need these functions to show US time... how can we change these functions to show US time? Thank you.
  9. just place donation button in right top side of the forum... Google adsense is not showing well in posts... need to hack smb better.
  10. if you are getting problem while trying to send mails.. then use some smtp classes .. go to phpclasses.org then get one...
  11. hi Timbo thanks for your reply... got solution :) thanks...
  12. ahh i got this solution by googling.. search word is... <a href images with blue border in google... solution is "border" info... we can remove border of an image by setting border value to 0... like... [code]<img src="" border="0"> [/code] :)
  13. hi here is the code which is showing some images.. [code] <a href="url.php?id=<?php echo($id); ?>" target="_BLANK"><img src="<?php echo($domain); ?>" alt="<?php echo($name); ?>"></a>[/code] The images are showing with a blue border line... actually i dont want that blue border... Any one can help?
  14. im not cleard with you... you said i can set it before including file... $id = 12; where you are connecting the $id with $banner_file ??? please clear my doubt.. any other better solution?
  15. banner.php is a file which outputs a banner image... if we call banner.php?59 then it will show 59th banner... i want to show banners in index.php i have this variable $banner_file = "banner.php?59"; if i include($banner.php?59); then it is giving an error... i tried $banner_file = "'"."banner.php?id=".$arr."'"; echo("$banner_file"); output is.. 'banner.php?id=12' still im getting faild to ourput stream...error... please help me
  16. ahh Thank you Barand , printf and amalosoul ... i did the following code while waiting for all of your replies.. please check this... :) [code]<?php session_start(); mysql_connect("localhost","root",""); mysql_select_db("djnaf"); if(!isset($_SESSION['total'])) { $num = mysql_num_rows(mysql_query("SELECT * FROM `banners`")); $_SESSION['total'] = $num; //echo("rows $num"); } $num = mysql_num_rows(mysql_query("SELECT * FROM `banners`")); //echo("rows $num"); $current = $_SESSION['total']; $query = "SELECT * from `banners` LIMIT 0,$current"; //echo($query); $pass = mysql_query($query) or die(mysql_error()); $numb = mysql_num_rows($pass); for($i = 1;$i <=$numb; $i++) { $fetch = mysql_fetch_array($pass); $id = stripslashes($fetch['id']); $banners[$i] = $id; //Add values in array. } print_r($banners); ksort($banners); $end = count($banners); $arr = array_pop($banners); echo("Show banner $arr"); if($current != 1) { $limit = (int)$current - 1; $_SESSION['total'] = $limit; } else { session_destroy(); unset($_SESSION['total']); } ?>[/code] SQL [quote]CREATE TABLE `banners` (   `id` int(11) NOT NULL,   `name` text NOT NULL ) TYPE=InnoDB; -- -- Dumping data for table `banners` -- INSERT INTO `banners` (`id`, `name`) VALUES (1, 'b1'); INSERT INTO `banners` (`id`, `name`) VALUES (2, 'b2'); INSERT INTO `banners` (`id`, `name`) VALUES (3, 'b3'); INSERT INTO `banners` (`id`, `name`) VALUES (4, 'b4'); INSERT INTO `banners` (`id`, `name`) VALUES (5, 'b5');[/quote] Plese test this script and tell me how it is :) im testing yours...
  17. no i mentioned 9... it is just an example... see if we use this techq in banner showcase script then the number of impressions should be balancers... let.. $a[1] = 1; $a[2] = 2; $a[3] = 3; $a[4] = 4; let us say each value of an array is pointing some other information like... banner id numbers which is placed in mysql table... if the page refreshes then our script should take one value from array... 1st impression <One array element> 2nd impression <Another array element> 3rd impression <... another....> if the page got refreshed 20 or 200 times (it should be n number of times) at end of the total impressions... we are going to see the individual impressions of each array elements. it should be balanced like... $a[1] = [10 impressions] $a[2] = [10 impressions] $a[3] = [12 impressions] $a[4] = [11 impressions] impressions should be like above.... got what im trying to say?
  18. let $array is having three elements i want to get those three elements randomly each time but it should be a balanced output... after 9th refresh of page... all elements should be outputted 3 times... Got what im saying?? can you help me?
  19. i got this from your host "We're sorry, but we were unable to locate the page you requested." it is 404
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.