www.webdeveloper.com

Search:

Type: Posts; User: The Little Guy

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. Thread: retrive

    by The Little Guy
    Replies
    1
    Views
    338

    Your going to need to explain this a bit more.

    Your going to need to explain this a bit more.
  2. the best way is to add unique keys to your table....

    the best way is to add unique keys to your table. So, depending on what columns need to be unique is what you would put the key on examples:

    email, username -- This would require that the email...
  3. Replies
    9
    Views
    864

    Do you really want to do that? Remember...

    Do you really want to do that?

    Remember Databases can hold TONS of data and still run at lightning speed. So you can then just search for information between certain dates, for example:


    ...
  4. Replies
    9
    Views
    864

    You can write a cron job in any language you...

    You can write a cron job in any language you wish, as long as the server can run/understand the file.

    purging the database contents isn't always a good idea, so you may want to think whether you...
  5. are you trying to build averages? if so, you...

    are you trying to build averages? if so, you should store each vote in a table.

    article_id | vote | date | ip

    then you can easily get an average:


    select avg(vote) as average from votes...
  6. I would write a mysqldump cron: cron.sh: ...

    I would write a mysqldump cron:

    cron.sh:


    #!/bin/bash
    mysqldump -h localhost -u superuser -pmy_pass myDatabase table1 table2 table3 > ~/myfile.sql
    mysql -h localhost -u superuser -pmy_pass...
  7. create table mytable2 select * from myoriginal...

    create table mytable2 select * from myoriginal where 0;
  8. Replies
    5
    Views
    1,359

    Try this: Select * from uploads left join...

    Try this:


    Select *
    from uploads left join documents on (uploads.user = documents.user)
    WHERE uploads.user = '$userID'
    ORDER BY uploads.title ASC, documents.title ASC
  9. I do orders on tables with 500 million rows, and...

    I do orders on tables with 500 million rows, and it runs in under 2 seconds. It just depends on how good your indexes are.

    Mysql doesn't always put the new record at the end of the file, if...
  10. You have two '?' in your query but only one...

    You have two '?' in your query but only one replacement in your bind
  11. Replies
    3
    Views
    739

    I would revise that to this: $Date4 = "";...

    I would revise that to this:



    $Date4 = "";
    if(!empty($row['field'])) {
    $Date4 = date("D d-M-y", strtotime($person['om20']));
    }
    echo $Date4;
  12. Replies
    3
    Views
    1,617

    not sure, but I think you want to check out...

    not sure, but I think you want to check out http://php.net/substr
  13. Replies
    1
    Views
    1,653

    Not sure what db your using by in MySQL you would...

    Not sure what db your using by in MySQL you would do this:


    SELECT count(*) as total, login_time from LOGIN group by login_time;
  14. Replies
    2
    Views
    911

    add a unique index to product_id, then with your...

    add a unique index to product_id, then with your insert do:

    INSERT IGNORE INTO ....

    by adding IGNORE, you don't add the row if it already exists.

    also, you should use...
  15. Replies
    11
    Views
    1,625

    I just wanted to make it faster to use my...

    I just wanted to make it faster to use my library. The goal of the library is the same as jquery's goal, "Write less. Do more."
  16. Replies
    11
    Views
    1,625

    use() does work, but it is still not what I am...

    use() does work, but it is still not what I am after.

    <?php
    $live->get_http("http://godaddy.com")->callback(function() use($live){
    echo "<h2>$live->title</h2>";
    });
    ?>
  17. echo it out, then copy and paste it into the...

    echo it out, then copy and paste it into the terminal. Does it still work?


    echo '/usr/bin/php -q /var/www/html/test.php '.$en.' > /dev/null 2>/dev/null &';
  18. Replies
    11
    Views
    1,625

    hmm... that isn't really going to help me :( ...

    hmm... that isn't really going to help me :(

    It seems as if this is the best I am going to get:

    <?php
    require_once 'phpLive.php';
    $live->get_http("http://google.com")->callback(function(){ ...
  19. Replies
    5
    Views
    2,201

    Don't do that, that could be insecure. You really...

    Don't do that, that could be insecure. You really only want to pass reference values through a get, such as an id number to a unique value in a database.

    I would stick with sessions, they are easy...
  20. $total = count(glob("mydir/*.jpg")); echo $total;

    $total = count(glob("mydir/*.jpg"));
    echo $total;
  21. Replies
    3
    Views
    6,875

    You might be able to do something like this: ...

    You might be able to do something like this:

    (untested)

    <?php
    $sql = mysql_query("select name, id, dob, month(regdate) as cmonth from users order by month(regdate)");
    $array = array();...
  22. Replies
    11
    Views
    1,625

    Okay, in jquery $ is created in the jquery.js...

    Okay, in jquery $ is created in the jquery.js file, when you call $ within a function you don't need to make it global because it already is.

    example:

    $("a").click(function(){
    ...
  23. Replies
    11
    Views
    1,625

    I would like to have it readily available as soon...

    I would like to have it readily available as soon as I make the new Closure function (or what ever it is called).

    So people who use this library don't have to make the instance global within the...
  24. Replies
    2
    Views
    2,072

    Yes, and assuming your using php, it would look...

    Yes, and assuming your using php, it would look something like this:


    $conn1 = mysql_connect("mysite1.com", "123", "123");
    mysql_select_db("mydatabase1", $conn1);

    $conn2 =...
  25. Replies
    3
    Views
    6,875

    Like this: select name, id, dob from users...

    Like this:


    select name, id, dob from users order by month(regdate);
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles