Search:

Type: Posts; User: penagate

Page 1 of 13 1 2 3 4

Search: Search took 0.28 seconds.

  1. Replies
    35
    Views
    917

    Re: Reputation Gems or Lights?

    They are PNG images.
  2. Replies
    168
    Views
    4,070

    Re: The State of VBForums

    I miss nostalgia.
  3. Replies
    4
    Views
    489

    Re: Find the last non zero value in an array

    No need to reverse the array...


    function lastNonZero($list)
    {
    for ($i = count($list) - 1; i >= 0; --i)
    if ($list[$i] !== 0)
    return $list[$i];
    return null;
    }
  4. Replies
    18
    Views
    700

    Re: how to get job in .net

    That's a ringing endorsement if there ever was one! :lol:
  5. Replies
    18
    Views
    700

    Re: how to get job in .net

    That's a ringing endorsement if there ever was one! :lol:
  6. Re: How to reference a element using code-behind?

    Thread moved.
  7. Replies
    5
    Views
    577

    Re: Very slow running code....

    You need to import $db1 in the functions:

    global $db1;

    The code you have should produce error messages. Do you have them turned off?

    error_reporting(E_ALL);

    I'm at work now, but I'll...
  8. Replies
    5
    Views
    577

    Re: Very slow running code....

    Hard to say exactly which part is taking the most time.

    Some things I would change:
    — It looks like you're opening multiple connections to the database. You should open the connection once, at...
  9. Re: Installing PHP 5.3 and Apache HTTP Server on Windows 7

    Good tips. I'll update the guide soon.
  10. Thread: PHP Thread

    by penagate
    Replies
    1
    Views
    374

    Re: PHP Thread

    http://php.net/set_time_limit

    and

    http://php.net/setcookie
  11. Replies
    22
    Views
    1,009

    Re: Ideas For NES Emulator Name

    NESquick
  12. Replies
    3
    Views
    346

    Re: Programmer's Notebook

    Just got one of these for work:
    http://www.samsung.com/au/consumer/pc-peripherals/notebook-pc/everyday/NP350V5C-S07AU

    It's light enough and it has a proper keyboard (with the numeric keys).
    I...
  13. Replies
    36
    Views
    923

    Re: Need advice on old car

    That is a lot of rust... Did you check the floor and chassis rails too? I forsee a lot of bog in your future...
  14. Replies
    1
    Views
    401

    Re: col names using pdo

    Try
    http://php.net/manual/en/pdostatement.getcolumnmeta.php
  15. Replies
    1
    Views
    530

    Re: converting mysql to mysqli

    Interesting!

    Just as a reminder: We don't scan links for viruses, so install the software linked above at your own risk.
  16. Replies
    48
    Views
    1,979

    Re: How long is your password?

    Are you saying I shouldn't be doing that?
  17. Replies
    3
    Views
    811

    Re: Validate inputs

    You could use the htmlspecialchars function to encode the text before inserting it into the XML document:


    htmlspecialchars($text, ENT_XML1)
  18. Re: how to output only the last 4 items of array in a for loop?

    In case the array contains less than four elements...


    $n = count($foo2[1]);
    for ($i = max(0, $n - 4); $i < $n; ++$i)
    {
    //...
    }
  19. Replies
    49
    Views
    2,030

    Re: 2016 US election predictions.

    I disagree with the assertion that the U.S. economy will worsen over the next four years.
  20. Replies
    11
    Views
    599

    Re: Aaaaaaaarrrrghhh!

    I lost about three months worth of work last year when my new SSD died. Like you I hadn't put it in to source control and my backup strategy was reckless (no backups). It took about a week or two...
  21. Replies
    2
    Views
    657

    Re: How to change Javascript to work with IE

    The code should work in Internet Explorer versions 9+. In earlier versions the non-standard 'attachEvent' method must be used instead of 'addEventListener'.

    Also, I recommend attaching all event...
  22. Re: What measures do you have in place at your house to take care of intruders?

    Either way, I feel fine about it.
  23. Re: Trying to add a related cars code using PHP/SQL

    Another one with no subquery:

    select img.* from bns_cars_images img join bns_cars car1 on car1.id=img.record_id join bns_cars car2 on car1.type=car2.type where car2.id=360 group by img.record_id;
  24. Re: Trying to add a related cars code using PHP/SQL

    OK, I shouldn't have assumed!

    select img.* from bns_cars car left join bns_cars_images img on img.record_id=car.id where car.type=(select type from bns_cars where id=360) group by img.record_id;
    ...
  25. Re: Trying to add a related cars code using PHP/SQL

    Also, I strongly suggest you get out of this habit as soon as possible:


    $sq = "SELECT * FROM bns_cars WHERE id = (".$_GET['id'].")";
    $dat = mysql_query( $sq );

    This is what's called an SQL...
  26. Re: Trying to add a related cars code using PHP/SQL

    I assume the URL will contain the type number and not the car ID. (You've given 'id' in your example URL, but I think you actually want to search by type.)

    If the type is given:

    select img.*...
  27. Re: [RESOLVED] HELP needed for php storing date-time cookie and display

    No worries. Glad you got it sorted.
  28. Re: HELP needed for php storing date-time cookie and display

    OK, noted. As the moderator, may I offer you some advice in turn? If so, I suggest you drop the SMS-style abbreviations and invest some time in capitalising and punctuating your writing: it's a...
  29. Replies
    5
    Views
    769

    Re: Javascript isn't being executed?

    Thread moved.
  30. Re: HELP needed for php storing date-time cookie and display

    If you aren't interested in learning, I suggest you hire someone to write the code for you. On this site, you could try the Project Requests section (for unpaid work), or Open Positions (for paid...
  31. Replies
    7
    Views
    943

    Re: Convert to PHP5.3

    I have to say your request is a more than a little unusual. There is nothing in that code that explicitly ties it to a particular version of PHP, except for the use of session_register, which was...
  32. Re: FORUM ISSUES: Report Upgraded Issues in this thread

    Quick reply was re-enabled a couple of days ago. I don't know how your posts got submitted out of order.
  33. Replies
    4
    Views
    646

    Re: Selecting from MySql

    A couple of ways. You can try the PDOStatement::rowCount property, but note the caveat described on that page which is that not all database systems will return the number of rows after a SELECT...
  34. Replies
    5
    Views
    825

    Re: Problem with cross-browser

    I doubt anyone bother to register — just post the source code of the affected page.
  35. Replies
    2
    Views
    456

    Re: Why is this not counting correctly?

    What a mess...


    <?php
    $query = mysql_query ( "SELECT * FROM `Stations` LIMIT 6" );
    $num = 1;

    while ($fea = mysql_fetch_object($query)):
    ?>
    <li><?php echo $num++ ?></td></li>
  36. Replies
    4
    Views
    646

    Re: Selecting from MySql

    Notes:

    — You're using the old MySQL library. If you've just got started, stop now: I recommend PDO instead.


    $dbh = new PDO('mysql:dbname=example;host=example');

    // ...
    ...
  37. Replies
    4
    Views
    646

    Re: Selecting from MySql

    $response['equip'] = [];
    while ($row = mysql_fetch_assoc($result))
    $response['equip'][] = $row;
  38. Re: FORUM ISSUES: Report Upgraded Issues in this thread

    I don't think it's a bug — I believe the "Last Post" field is updated on an interval, rather than immediately.
  39. Re: Installing PHP 5.3 and Apache HTTP Server on Windows 7

    Make sure the terminal you use to run the command has administrative privileges. (When logged in as a user with admin rights, find 'Command Prompt' in the Start menu, right-click on it, and choose...
  40. Replies
    3
    Views
    1,146

    Re: associative array in JS

    If you were to put quotes around the keys, it would become valid JSON, and then you could use JSON.parse to evaluate the string.
    Otherwise, you're limited to eval, which is not the best option...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4