Jump to content

litebearer

Members
  • Posts

    2,356
  • Joined

  • Last visited

Posts posted by litebearer

  1. named: joe.xls, sally.doc, just.some.text.txt, grumpy.old.man.php -- valid names

    type: .xls, .doc, .txt, . php --- extension that lets computer/people what program is most likely to read/use the file

    format: the actual 'structure' of the file content

  2. Rough concept

     

    Concept  (comments allowed based upon a new day is considered midnight GMT):

    total_comments table

    id, user_id

     

    when a user makes a comment, check the total_comments table by COUNTING records where user_id = the user's id.

     

    if count is >2, deny post, else add a record to the table and process the comment as normal.

     

    cron job to run at midnite GMT - truncate the total_comments table

     

     

  3. This statement....

    However, since I have potential gaps in data, sometimes I get this (r3[2] in r2[2]'s spot):

    leads me suspect the real issue is how you populate your db table.

    based upon the example I provided (and we will address the grouping later) r3[2] should NEVER be in r2[2]'s spot unless your insert query did not leave r2[2] empty.

     

    ie name, street, city - if my insert, for whatever reason, puts city in the street field, then I will have problems.

     

    Time to show us how and why you are inserting data into your db table.

     

  4. Being a firm believer in minimalist testing, try this example

    <?PHP
    $query = "SELECT * FROM labc101 WHERE date='$curDay' ORDER BY period ASC";
    $result = mysql_query($query, $link) or die {throw new Exception("Catastrophic Failure.", 10);
    if(mysql_num_rows<1) {
    echo "No records";
    exit();
    }
    ?>
    <table>
    <tr><td></td><td>result1</td><td>result2</td><td>result2</td><td>id</td><td>date</td><td>period</td></tr>
    <?PHP
    while($row = mysql_fetch_array($result)) {
      ?>
    <tr>
    	<td>C101</td>
    	<td><?PHP echo $row[0]; ?></td>
    	<td><?PHP echo $row[1]; ?></td>
    	<td><?PHP echo $row[2]; ?></td>
    	<td><?PHP echo $row[3]; ?></td>
    	<td><?PHP echo $row[4]; ?></td>
    	<td><?PHP echo $row[5]; ?></td>
    </tr>
    <?PHP
    }
    echo "</table>";
    ?>
    

×
×
  • 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.