Search Results

Search found 60 results on 3 pages for 'ahmet vardar'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • easy mysql query question

    - by Ahmet vardar
    Hi, here is the "msg" table on mysql sent_to customer msg read ------- -------- ------ ----- 45 3 bla 0 34 4 bla 1 34 6 bla 0 45 3 bla 0 56 7 bla 1 45 8 bla 0 for example user whose id number is 45 logs in, i want him to see this, you have 2 unread msg to your "number 3" customer you have 1 unread msg to your "number 8" customer like a news feed what query should i use for this ? thx

    Read the article

  • php connection using HttpWebRequest and Get method

    - by Ahmet vardar
    Hi, i have a script returns some string, http://mysite.com/script.php php script; $data = $_GET['q']; $query = "SELECT * FROM `table` WHERE ID = '$data'"; $result = mysql_query($query); $num = mysql_num_rows($result); print $num; i want to connect this script with VB, using this code Dim con As String con = "http://mysite.com/script.php?q=" & My.Settings.setq Dim request = HttpWebRequest.Create(con) request.Method = "GET" Dim response = request.GetResponse() Using reader = New StreamReader(response.GetResponseStream()) msgbox(reader.ReadToEnd()) End Using it is not working. how can i do that ? thanks

    Read the article

  • zipping file problem on the server PHP

    - by Ahmet vardar
    Hi, here is my code; error_reporting(-1); require("zip_min.php"); $f = $_SERVER['DOCUMENT_ROOT'] ."/mp3/allmp3s.zip"; if (!file_exists($f)) { $zipfile = new zipfile(); $folder = $_SERVER['DOCUMENT_ROOT'] ."/mp3; if (is_dir($folder)) { if($dir = opendir ($folder)) { while (false !== ($file = readdir($dir))) { if($file != ".") { if($file != "..") { $zipfile -> addFile(file_get_contents($folder."/".$file), $file); } } } closedir($dir); $contents = $zipfile -> file(); if (file_put_contents($f, $contents)) { print "ok"; } else { print "error creating file"; } } } else { print "error"; } } else { print "file already exists"; } there are 10 mp3 files total size of 100 mb, when i execute this script, i got just a blank page, nothing happens. but with 30-40 mb of size it works great. what should i do ? thanks so much

    Read the article

  • direct file download protection

    - by Ahmet vardar
    Hi, I have a folder for downloads on my server, i want to prevent direct access to that folder so i am makin it pass-protected with htaccess and i will push download with a php script. But i have some questions regarding mkdir and file_exists Do mkdir and file_exists works good for pass-protected folders ? and would i get any error while uploading file to that folder ? AND is this a good way of preventing direct access ? thanks

    Read the article

  • datetime diff doesn't work

    - by Ahmet vardar
    Hi here is my code function check($dt) { $date = date("Y-m-d"); $start = new DateTime($date); $end = new DateTime($dt); $diff = $start->diff( $end ); return $diff->format( '%d days' ); } print check('2009-12-14'); that prints 29 days where am i wrong ?

    Read the article

  • dynamic element positioning

    - by Ahmet vardar
    Hi, I have been seeing this thing for months and years and i really wanna know how to do that one. For example, there is an element in the middle of the page. and it is in absolute position. When scroll downs and comes to that element, it becomes fixed positioned and follows the scroll, when scroll up and back to middle of the page it becomes absolute again. I can give google adwords accounts page as an example, in the campaigns page, your keywords' header is the same thing. how to do that one ? thanks

    Read the article

  • datesub question

    - by Ahmet vardar
    Hi, is it possible to use date_sub like this ? $dt = date("Y-m-d h:i:s"); $query = "INSERT INTO `table` (`date`) VALUES ('DATE_SUB('$dt', INTERVAL 15 DAY)')"; $result = MYSQL_QUERY($query); Thanks

    Read the article

  • replacing characters with UTF-8 after using mysql_set_charset('utf8') function

    - by Ahmet vardar
    I converted all mysql tables to utf-8_unicode and started using mysql_set_charset('utf8'); function. But after this, some characters like S, Ö started looking like Ö , Åž How can i replace this kinda letters in mysql with UTF-8 format ? shortly, can i find a list of all these kinda characters to replace ? EDIT: He is explaining about this issue in this article actually but i cannot understand it properly acutally lol http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html

    Read the article

  • Linq To Sql - DataContext.SubmitChanges() problem

    - by Ahmet Altun
    I have a code like this. DBContext is Datacontext instance. try { TBLORGANISM org = new TBLORGANISM(); org.OrganismDesc = p.Subject; DBContext.TBLORGANISMs.InsertOnSubmit(org); DBContext.SubmitChanges(); } catch (Exception) { } At this point, I want to IGNORE the error and want to be skipped. Not to be retried. But when I try another insert like TBLACTION act = new TBLACTION(); act.ActionDesc = p.ActionName; DBContext.TBLACTIONs.InsertOnSubmit(act); DBContext.SubmitChanges(); SubmitChanges firstly retries previous attempt. How can I tell "skip errors, don't try again"?

    Read the article

  • What is the maximum length of a C# string [closed]

    - by Ahmet Altun
    Possible Duplicate: What is the maximum possible length of a .NET string? How long a C# string can be in maximum? Is there any limitation? Considering if MSN was written in C#, the instant messaging would be designed as Textbox. So, the content would be Textbox.text, which is a string. But can System.string can store such a long value. I assume, string class holds value contiguously.

    Read the article

  • Socket Communication in C#- IP-Port

    - by Ahmet Altun
    I am testing my socket programs at home, in local network. Server and client programs are running on seperate machines. Server program socket is binded as: serverSocket.Bind(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 8999)); Client program (on the other computer) is connected as: clientSocket.Connect(IPAddress.Parse("192.168.2.3"), 8999); Why can Client not communicate with server? Do I need to make some firewall configuration or something like that? Or am I writing Server Ip incorrectly to the Client? (I got it from cmd-ipconfig of server)

    Read the article

  • How to use DoG Pyramid in SIFT

    - by Ahmet Keskin
    Hi all, I am very new in image processing and pattern recognition. I am trying to implement SIFT algorithm where I am able to create the DoG pyramid and identify the local maximum or minimum in each octave. What I don't understand is that how to use these local max/min in each octave. How do I combine these points? My question may sound very trivial. I have read Lowe's paper, but could not really understand what he did after he built the DoG pyramid. Any help is appreciated. Thank you

    Read the article

  • Linq To Sql - SQL Default Constraint Problem

    - by Ahmet Altun
    I have a USER table in database. The table has a RegistrationDate column which has a default constraint as GETDATE(). When using LINQ, I don't provide any data for RegistrationDate column to make it default. But SQL Server raises error. I think LINQ tries to insert NULL into the column. How can I make LINQ not to try to insert in the column RegistrationDate, because it has default value?

    Read the article

  • Why is the C# SerializedAttribute is sealed?

    - by ahmet alp balkan
    I was trying to create an attribute that implies [Serializable] but I noticed that this SerializableAttribute class is sealed. In Java it was possible to create an interface (say, MyInterface) that is inherited from Serializable interface and so all the subclasses of MyInterface would also be serializable, even its sub-sub classes would be so. Let's say I am creating an ORM and I want customers to annotate their entity classes as [DatabaseEntity] but in order to make sure that entities are serializable, I also need to ask them to attribute their classes with extra [Serializable] which does not look quite compact and neat. I am wondering why SerializableAttribute class is sealed and why has Inherited=false which implies that subclasses of serializable class will not be serializable unless it is explicitly stated. What motives are behind these design choices?

    Read the article

  • Problem about socket communication

    - by Ahmet Altun
    I have two separate socket projects in VS.NET. One of them is sender, other one is receiver. After starting receiver, i send data from sender. Although send method returns 13 bytes as successfully transferred, the receiver receives 0 (zero). The receiver accepts sender socket and listens to it. But cannot receive data. Why? P.S. : If sender code is put in receiver project, receiver can get data, as well.

    Read the article

  • Unable to jump to row 0 on MySQL result index 13

    - by Ahmet Kemal
    What is the reason of the error on title? My script is below. Thank you. $fbFoodPerma = $fbSiteID."-".$fbFoodPerma; $sql = mysql_query(" SELECT fbFoodPerma FROM fbFoods WHERE fbFoodPerma LIKE '$fbFoodPerma'") or die(mysql_error()); $isStored = mysql_result($sql,0,"fbFoodPerma"); while ($isStored == "$fbFoodPerma") { $fbFoodPerma = $fbFoodPerma."-"; $sql = mysql_query(" SELECT fbFoodPerma FROM fbFoods WHERE fbFoodPerma LIKE '$fbFoodPerma'") or die(mysql_error()); $isStored = mysql_result($sql,0,"fbFoodPerma"); }

    Read the article

  • How to add a class to just upper element of trigger with Jquery?

    - by Ahmet Kemal
    Hello, I am working on a Jquery accordion stuff. I want to add a class to the div that contains the accordion trigger <a> tag. You can look at my code. I want to add "first" class name to just first "newsitems" class when clicked "Recession fashion in Japan Video" title. <!-- news items starts--> <div class="newsitems"> <h3 class="business"> <a href="#" title="expand"><img src="images/expand_icon.gif" alt="collapse" class="collpase" /> Recession fashion in Japan Video</a> </h3> <p class="timestamp">0100hrs</p> </div> <!-- news items ends--> <!-- news items starts--> <div class="newsitems"> <h3 class="sports"> <a href="#" title="expand"><img src="images/expand_icon.gif" alt="collapse" class="collpase" /> Murray survives five-set thriller at Wimbledon</a> </h3> <p class="timestamp">0100hrs</p> </div> <!-- news items ends-->

    Read the article

  • SQL Server Delete - Froregin Key

    - by Ahmet Altun
    I have got two tables in Sql Server 2005: USER Table: information about user and so on. COUNTRY Table : Holds list of whole countries on the world. USER_COUNTRY Table: Which matches, which user has visited which county. It holds, UserID and CountryID. For example, USER_COUNTRY table looks like this: ID -- UserID -- CountryID 1 -- 1 -- 34 2 -- 1 -- 5 3 -- 2 -- 17 4 -- 2 -- 12 5 -- 2 -- 21 6 -- 3 -- 19 My question is that: When a user is deleted in USER table, how can I make associated records in USER_COUNTRY table deleted directly. Maybe, by using Foreign Key Constaint?

    Read the article

< Previous Page | 1 2 3  | Next Page >