Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
What fields do I need to make?
Old 06-23-2006, 10:38 PM What fields do I need to make?
Junior Talker

Posts: 2
Trades: 0
This is the code:

PHP Code:
 // this function views logs
   
function viewLogs($page) {

      echo(
"<p align=left><b><i>Logs</i></b><hr></p><center><table border=0 width=100% cellspacing=1 cellpadding=2>");

      
$result mysql_query("SELECT COUNT(*) FROM log");
      
$count mysql_fetch_array($result);
      
$count $count[0];

      
$logsperpage 50;

      
$num_pages = ($count $logsperpage) + 1;
      
$limit $logsperpage * ($page 1);

      
$result mysql_query("SELECT * FROM log ORDER BY id DESC LIMIT $limit$logsperpage");
      while( (
$row mysql_fetch_array($result) ) ) {
         
extract($row);

         echo(
"<tr><td bgcolor=#000000>");

         
$longlog "$date1 $action";
         
$reason bbc2html($longlog);
         
$thelog "<a href=console.php?p=OneLog&log1=$id$reason </a>";

         echo
"<font size='1' color='white'> $thelog</td>";
      }
      echo
"<tr><td><font size='1' color='white'>Page:";
      for(
$i 1$i <= $num_pages$i++) {
         echo(
"<a href=console.php?p=ViewLogs&page=$i>$i</a>");
      }
      echo(
"<br><font size='1' color='white'> Current Page: <font color='green'>$page </font>
   <br><font size='1' color='white'> Number of Logs Per Page: <font color='green'>
$logsperpage</font></table></center>");
   } 
// end viewLogs 
what fields do I need to make in the table "log" for this to work?
Arez777 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-25-2006, 06:38 AM Re: What fields do I need to make?
cdwhalley.com's Avatar
Skilled Talker

Posts: 75
Trades: 0
Looks like:
id
date1
action
cdwhalley.com is offline
Reply With Quote
View Public Profile Visit cdwhalley.com's homepage!
 
Reply     « Reply to What fields do I need to make?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09858 seconds with 12 queries