Jump to content

CravenBW

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    cravenbw

Profile Information

  • Gender
    Not Telling

CravenBW's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please ignore. I found a solution while researching things. I decided to ditch the php way and got it completed via a mysql query.
  2. Have you thought about storing all of that info on a mysql table. Display the same page to all users but the content will be dynamic based on what is in the mysql table. You could display all of their order history and a company profile that are both stored in a database but not necessarily the same table.
  3. I'm trying to get the number of rows based on two tables... it's not quite working right. Can anyone see anything wrong with the code below or give me another idea by any chance? The date stuff still needs some work but it works for right now. My main issue right now is getting active working which checks for usernames that are both signed up and validated then is supposed to take those usernames and see if they've logged in more then 1 time but that part isn't working. :-( [code]<?php print '<table cellspacing="5px" style="text-align: center;"><tr style="text-align: left;"><td><b>DATE</b></td><td><b>SIGNUP</b></td><td><b>VALIDATED</b></td><td><b>ACTIVE</b></td></tr>'; $link = mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("database", $link); $date = date("mdY",strtotime("-10 day")); $today = date("mdY:"); while($date < $today) {   $sign = mysql_query("SELECT * FROM users WHERE signdate LIKE '$date%'");   $validate = mysql_query("SELECT * FROM users WHERE validate != '' AND signdate LIKE '$date%'");   $active = mysql_query("SELECT username FROM users WHERE validate LIKE '$today%' AND signdate LIKE '$today%'");       print '<tr><td><b>'.substr($date,0,2).'/'.substr($date,2,2).'/'.substr($date,4).'</b></td>';     print '<td>'.mysql_num_rows($sign).'</td>';     print '<td>'.mysql_num_rows($validate).'</td>';   while($row = mysql_fetch_array($active)) {     $numrows = mysql_query("SELECT * FROM ftp WHERE username='$row[username]' AND ftp_logincount >= '2'");     print '<td>'.mysql_num_rows($numrows).'</td></tr>';   }   if ($date < "".date("m",strtotime("-1 month"))."31".date("Y")."") {     $date = $date + 10000;   }   elseif ($date > "".date("m")."00".date("Y")."") {     $date = $date + 10000;   }   elseif ($date = "".date("m",strtotime("-1 month"))."31".date("Y")."") {     $date = date("m");     $date .= "01";     $date .= date("Y");   }     } print '</table>'; ?>[/code]
  4. I got it to work and figured out what my error was.
  5. I have a database that has a single table and I'm trying to change it to merge the data from one table in a database to two tables in a different database. Can anyone help lead me in the way to move the data between two databases?
×
×
  • 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.