Jump to content

hvle

Members
  • Posts

    667
  • Joined

  • Last visited

Everything posted by hvle

  1. select t1.idn as matchId,t1.homeTeamId,t1.awayTeamid,t2.teamName as homeTeamName, t3.teamName as awayTeamName from `game` t1 join `team` t2 on t1.homeTeamId=t2.teamId join `team` t3 on t1.awayTeamId=t3.teamId
  2. hi guys, couldn't think of a single query that do this: table 'team' teamID teamName 1 Sharks 2 Red Wings table 'game' gameId homeTeamId awayTeamId 100 1 2 I want a query that return 1 row like this matchId homeTeamId awayTeamId homeTeamName awayTeamName 100 1 2 Sharks Red Wings Any idea?
  3. forget about the indexes notice (they're just notice to help debugging, not error). What do you have in /var/www/html/FatalIndustries/database.php on line 50 ?
  4. Screw Windows, even if you get it to work, it can't be trusted. Here's an alternative: Installl VMWare + Linux Virtual Machine + configure some NAT. You'll have a perfectly good Linux to host the website on, plus it would be most secured.
  5. thanks ratcateme, I figure so, gotta use third party library. customer satisfaction is a pain the a$$
  6. I don't think it is possible but I post here anyway. Who know there are many brilliant mind out there. Thanks
  7. Thanks, I will definitely take a look at sajax
  8. Ajax: will not solve this Some experience I like to share: This is the output buffering in PHP, as btherl pointed out. I wouldn't want to change the good ini settings to get this work. If that's not the case, you can follow btherl instruction. I found that using ob_flush() and flush() can be somewhat help, although not ideally solve my problem.
  9. Hi guys, I have a script running on linux. This script spit out text (stdout) as it run. I want this text to pass directly to browser. I used passthru command to execute the script but browser will wait until this php script finished then display all the output at once. Is there a way to achieve this? thanks
  10. it sould be $_POST["$value"] or $_POST[$value] both above cases would not generate error but it would not return the result you wanted.
  11. Yes, it is possible. You need to make sure the user account that owned by the webserver have access to this folder and open this file like you open a file on the local machine.
  12. Thanks Luca, your answer are as good as any others. I am asking for a book to learn the quick and easy way, but the fact is there is no quick and easy way get to expert. I gotta work on it everyday like you did. Good thing is we have this forum to share our experience. Again, thank for a excellent solution and advice. Huy
  13. mysql_affected_rows([$database_link]) ; I think it won't work correctly because you passed in $Result, which is not a database link. try $updateCounter = mysql_affected_rows($Connection); or maybe just $updateCounter = mysql_affected_rows();
  14. You're definitely right. Thanks
  15. yes, the table filled 600K of records already after 2 weeks. It may look like a lot, but each record is only a few integers, with no text so it's pretty fast. It will eventually overflow after about 4 billions records which is approx 20 years. I intended to keep a 3 years history.
  16. Luca200, it works great. How did you learned these stuff? Do you have any recommended book on sql? Thank you very much
  17. you need to write a script, this script read each row, parse the csv into single field then insert into database. Sound complicated but could easily be written in PHP.
  18. Hope this question entertain you guys. I got a table called packet_log. As the name say it, it logs packets data in and out the gateway. 1. The table design Field Name - Data Type - Description id int(10) unique id of a packet, auto increment src_ip int(10) Source IP address - The ip address translated into 32 bits int dst_ip int(10) Destination IP address - same as above src_port short int source port - 16 bits int dst_port short int destination port -16 bits int sent_byte int(10) number of bytes sent from src ip to dst ip recv_byte int(10) number of bytes received from dst ip to src_ip conn_time int(10) time the connection initiated - in Epoch sent byte and recv bytes logged based on src ip and dst ip. If a connection initiated by A to B, sent byte will be the traffic from A to B, recv byte will be opposite. now, if B initiated by A, then sent byte will be from B to A, recv byte vice versa. Total traffic of host A consist of total send and total recv. Total send will be all the traffic send from A regardless of the connection make by A or by other host. Total recv is the same basic. Objective: Find the statistic report of a host A which include the total send and total received between host A and host B, order by (total send + total received). A sample report would be something like this report for host A IP sendsize recvsize total x.x.x.a 12mb 21mb 33mb x.x.x.y 13mb 18mb 31mb x.x.x.z 11mb 19mb 30mb Is there a way to get this report with a single query??? By using many query, I am able get what I wanted, but it just bug me not to find a way to do this with a single query. Thank you all.
  19. How do I fake filename ext? easy: ren *.pdf *.txt Windows is stupid, period. Try to upload an .exe using mime type text/html upload .PHP file? There is no rule to tell you have to save the upload file the same name as it was in local machine. And if you do that, you're too dumb to be programmer.
  20. file extension not fakable? mime type help server encode the file and client to handle the file appropriately, not extension.
  21. No you do not need secure server for paypal. All sensitive information like cc, address are to be entered inside paypal server and it is already secured. However, you need SS for other credit card using merchant account.
  22. prob this audio/x-ms-wmv http://support.microsoft.com/kb/288102
  23. so you wanted to disable the button while waiting for response from ajax?
  24. Check the image link to see if it point to the valid img file and go from there.
×
×
  • 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.