Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About TecTao

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  1. I've been out of coding for about 4 years. My client called and said that they upgraded his server and now nothing works. I've don't done some reading and see that there are changes to queries. I originally wrote the program using mysql_query which is now deprecated replaced with MySQLi and PDO_MySQL which I thought would be that simple. Apparently not. My code is below. The error I get is Fatal error: Call to undefined function MySQLi() in /home1/zipclick/public_html/marketingteamates.com/_ZABP_merchants/main-w.php on line 304 which leads me to believe that the upgrade is now solely object oriented. $result = MySQLi( "SELECT * FROM $users WHERE username = '$username'" ) or die("SELECT Error: ". mysqli_errno()); $num_rows = mysqli_num_rows($result); while ($row = mysqli_fetch_array($result)) { extract($row); }
  2. Yes there are five other fields, three that are identifiers to the particular businesses. Two are categories of those businesses. These fields were added early on years ago but are not necessary to any applications. The consumer_mgmt table handles sending out various emails for different specials. So we are finding multiple emails going out to the same recipient that had been added multiple time. I just need to pare it down so that there is one customer email for one business. There is a field of the date of entry so if there were the need to identify which of the multiple emails should be removed, it could be the oldest. I see where you are going with this, how would the script decide which entry stays and which ones get deleted.
  3. I need Delete Duplicate Email Records That Are Attached To One Account But Can Be Found In Multiple Accounts I have a table, consumer_mgmt. It collects consumer information from various forms. These forms are available through different pages that are part of a business package. A business can offer these signups to gather names and emails from consumers for various types of specials they may offer. So a consumer my be in the consumer_mgmt table 5, 10, 15 times for that particular business. But, that consumer may be in the consumer_mgmt table multiple times for a different business. So multiple times for multiple businesses. I need to remove duplicates for each business account so the consumer is only the consumer_mgmt only once for each business. There are approximately 15,000 rows currently in the consumer_mgmt table. I'm not sure where to begin on the logic. Since there are multiple business accounts that the emails are attached to, would one have to build a case for each loop?
  4. Thanks CroNiX, I understand your explanation. I read up on your in scope link and see what you are talking about. I move the $todayRepost35 into the function. I'm not clear completely on you point about never calling your function. Is this specific to the echo of the results? As I work on building this, I wanted to see the row results to verify it is selection the correct rows. If it does, then I will add the specific commands using the variables from each row. From what I have read and illustration, I assume that these commands are outside the function, and will loop through each time from the query in the function until completed. An example is below <?php $unLink1 = "/home/zipclick/public_html/specialslocator.com/FAP_Images/$FAPforSale_IDnumber/$FAPforSale_image1"; //echo $unLink2; unlink($unLink1); $unLink2 = "/home/zipclick/public_html/specialslocator.com/FAP_Images/$FAPforSale_IDnumber/$FAPforSale_image2"; //echo $unLink2; unlink($unLink2); $unLink3 = "/home/zipclick/public_html/specialslocator.com/FAP_Images/$FAPforSale_IDnumber/$FAPforSale_image3"; //echo $unLink2; unlink($unLink3); $unLink4 = "/home/zipclick/public_html/specialslocator.com/FAP_Images/$FAPforSale_IDnumber/gick.php"; //echo $unLink2; unlink($unLink4); $dir = "/home/zipclick/public_html/specialslocator.com/FAP_Images/$FAPforSale_IDnumber"; rmdir($dir); mysql_query("DELETE FROM FAP_forSale WHERE FAPforSale_username = '$con_username' AND FAPforSale_IDnumber = '$FAPforSale_IDnumber' "); ?>
  5. I am writing a CRON job that will execute daily. First it will identify from a MySql table the date in a field 'FAPforSale_repost35' If the date is the today date it will then execute commands to delete photo images in a directory, delete the directory, and finally remove the record from the database. I am on step one which is to build the array of records that match the days date. When I run the code, there are no errors but I am not getting results even though the records in the test table are set for today. Below is the select <?php define( "DIR", "../zabp_employee_benefits_processor_filesSm/", true ); require( '../zipconfig.php' ); require( DIR . 'lib/db.class.php' ); require_once( $_SERVER['DOCUMENT_ROOT'] . '/_ZABP_merchants/configRecognition.php' ); require_once( $_SERVER['DOCUMENT_ROOT'] . '/_ZABP_merchants/libRecognition/MailClass.inc' ); $todayRepost35 = date("Y-m-d"); echo $todayRepost35; function repostEndSelect() { global $db; $this->db = $db; $data = $this->db->searchQuery( "SELECT `FAPforSale_IDnumber`, `FAPforSale_image1`, `FAPforSale_image2`, `FAPforSale_image3`, `FAPforSale_repost35` FROM `FAP_forSaleTest` Where `FAPforSale_repost35` = '$todayRepost35' "); $this->FAPforSale_IDnumber = $data[0]['FAPforSale_IDnumber']; $this->FAPforSale_image1 = $data[0]['FAPforSale_image1']; $this->FAPforSale_image2 = $data[0]['FAPforSale_image2']; $this->FAPforSale_image3 = $data[0]['FAPforSale_image3']; $this->FAPforSale_repost35 = $data[0]['FAPforSale_repost35']; echo $this->FAPforSale_IDnumber; echo $this->FAPforSale_image1; echo $this->FAPforSale_image2; echo $this->FAPforSale_image3; echo $this->FAPforSale_repost35; } // ends function... echo( ' Finished...' ); ?> Thanks in advance for any suggestions or direction. Chapter two will be when I start testing the commands to delete.
  6. Thank you Requinix. This clears up issues and much to think about.
  7. This is something I've been trying to figure out for some time. I've read blogs and other forums and am still not clear. Seems that when I pass a variable that has Apostrophe's in the variable, from a form page to the submit page and insert it into the MySql DB table, it inserts OK without any / before the apostrophe. On the other hand on the same submit page, there is a select query from another table and there are variables with apostrophe's. These queried variables keep the variables from the form page and the queried DB from inserting into a new table. So I use mysql_real_escape_string () for the variables queried from the table to be inserted into the new table, don't use mysql_real_escape_string () on the variables passed frm the form page, and everything inserts into the new table just fine. Displays with no forward slashes. My confusion comes from when to use mysql_real_escape_string (), stripslashes () and htmlspecialchars(). Also in the reading I was doing, it looks like mysql_real_escape_string () is being replaced with mysqli_real_escape_string (), but when I tried to use it on a variable queried from the DB something like $username = mysqli_real_escape_string ( $s['username'] ) ( $s being 'foreach ( $result as $s )' from the select query. Thanks in advance for shedding any light on this.
  8. I may be mistaken but I think that would still put the original email in the header. Tyring to do an Anonymous Email like on Craigslist.
  9. I have built a small classified ads application. A person can put in an item for sale and it will diaplay the item. On the input form for the ad they enter their email address. I am looking for an application that will display an anonymous email address on the classified ad and send to the anonmmous email through to their real email address. I would prefer to do this through the web server of the client and not have to set up a Google Apps or third party email accout for the "catch all" account. Any recommendation for tutorials to explain and illustrate how to write this code. Thanks in advance for any assist. m
  • 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.