Jump to content

BMurtagh

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Everything posted by BMurtagh

  1. Hi Josh, The rewrite rule you'll want to use in the .htaccess is: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} domain.com RewriteCond %{REQUEST_URI} !<subfolder>/ RewriteRule ^(.*)$ <subfolder>/$1 [L] Save the changes & you should be good to go
  2. The best way to do this would be to read up on data normalization for MySQL database design (It sounds worse than it is) but this will get you thinking in a more programming/design-orientated state of mind. The reason for this is because you want to keep a record of past pricing. The way I'm picturing your table design is: tblOne - Object Name - Object ID (PK) - Date - Daily Minimum Price - Daily Market Price - Daily Maximum Price tblTwo - ID (PK of tblOne) -- should pull the data from tblOne w/ the min, market, max & date Once you have the data in there you can just increment the rows at the end of each day from the data in tblOne. This just my 2 cents, but below are some URLs to info about data normalization: http://www.devshed.com/c/a/MySQL/An-Introduction-to-Database-Normalization/ http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html http://www.developer.com/db/article.php/3667831
  3. Hey, If you have the mysqldump of the database you can restore it over the current database from command line. Once SSH'd on to the server use the following command: mysql -u [uname] -p[pass] [yourdatabase] < [backupfile.sql] This will restore the backupfile.sql to your database from command line. If you're using PHPMyAdmin follow these instructions at http://www.webcheatsheet.com/SQL/mysql_backup_restore.php#phpmyadmin
  4. Hi leoashcraft, The best method to troubleshoot would be to get access to the Apache error log for the website. Most hosts will grant you access to your site logs depending on how they have their clients setup. Within the error_log there should be some PHP notices/errors that can give you more information as to why the page isn't functioning properly & go from there.
  5. Hello, You're going to want to use PHP and create a while loop after finding out the max # of rows of data in the DB table. $sql = "SELECT * FROM <table>.<database>" $res = mysql_query($sql) or die; $num = mysql_numrows($res); /* that should get you the # of rows stored in $res */ Next would be to create the loop to insert the data into the new table: $i=0; while ($i < $num) { $sql = "INSERT INTO <table>.<database> SELECT <table>.<database> FROM <database>"; $res = mysql_query($sql) or die; $i++; } I have not had the ability to test the code as of right now, but this should at least get you on the right track for accomplishing this. Check this out and reply back if you have other questions
  6. Hello, The backticks (`) should be the proper formatting for this according to PHP's legal-names. However, can you set the code to use the backticks and copy the error to here? I think pasting the exact output error and/or the apache error_log would help those who view the thread more info to help out.
  7. Hi, The best method would be to enable SMTP logging from within IIS Manager. Once you've enabled the logging of the SMTP traffic for the local mail server, you can then use you PHP mail() test page & check the log. Below is a quick script mail() example if needed: <?php if(mail('[email protected]','test subject','test message')){ echo('ok'); } else{ echo('not ok'); } ?>
  8. Hi, You're going to want to use LDAP on the Linux box in conjunction with the Active Directory that's already setup. PHP has a pretty decent amount of info on the various functions related to LDAP on their website at http://us3.php.net/manual/en/book.ldap.php. I also found a pretty interesting article at http://articles.techrepublic.com.com/5100-10878_11-5032010.html that you might be some extra info for getting you started.
  9. Hi, After doing 'which autoscan' if it comes back as not found, you'll want to install autoscan. To do so, see below: 1. sudo to become superuser 2. Run either: sudo aptitude install autoscan OR sudo apt-get install autoscan These will install the autoscan package from the repositories setup on the Linux box. If you want to make sure your packages are up to date, you can run: sudo apt-get update Run this command after changing /etc/apt/sources.list or /etc/apt/preferences . This command periodically to make sure your source list is up-to-date.
  10. Hi there, I was doing some research about your error and it looks this error message appears when you try to create a FOREIGN KEY constraint on a column that does not exist in the referenced table. Error of the Severity Level 16 are generated by the user and are correctable by the user. The statement cannot be executed this way. FOREIGN KEY constraints can only reference columns that do exist at the time when the constraint is created.
  11. Hi Russ, I would need you to paste the code for http://www.scaninc.org/PHPcode/Form2Excel.php in order to help troubleshoot the error. Let me know if you can do so, thanks
  12. Hi, I would put begin to put your code for the next page after a successful login in: /* Validate that password is correct */ if($password == $dbarray['password']){ //proceed to perform website’s functionality – e.g. present information to the user } else{ return 2; //Indicates password failure } } I removed the return 0; line because the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call. And even if there was code after the return 0; line, it would not be executed. The else statement is fine as is because it should catch anything that indicates a failed login. I would also move the cookies/previous login snippet to the beginning of the code because it would make more sense to check right off the bat if the user has already been logged in or not before doing the actual username & password check.
×
×
  • 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.