Jump to content

HalRau

Members
  • Posts

    35
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

HalRau's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oops! Just found a problem using JOIN. The table LSFM_Subsribers contains records of both "PayPal subscribers" and "Paid by Check subscribers." In the case of Paid by Check subscribers there is no corresponding record in the dc_donations table. SO, I figured out a way to store the donation amout in the Subscribers table as it is created. I no longer need the JOIN. I really appreciate the time you spent on this and have saved the code so I can use it in the future should the need arise.
  2. Thanks Guru, With some modifications the code worked using JOIN
  3. Thank you Guru. Adding ; at the end of line 223 removed the error but no value for amount is showing up in the table cell. Tried changing line 220 to <td><?php $name = $row_rsSubscribers['Sub_tranxID']; but still blank. Any ideas?
  4. Hi, I have two tables in the same database that contain the same transaction_id In the one table the amount of the transcation is also stored. I would like to display the amount in a listing of other values from the one table by matching the transaction_ id values in the two tables. Here is the code I have tried. <?php do { ?> <?php if ($totalRows_rsSubscribers > 0) { // Show if recordset not empty ?> <tr> <td><?php echo $row_rsSubscribers['Sub_lastname']; ?>, <?php echo $row_rsSubscribers['Sub_firstname']; ?> <?php echo $row_rsSubscribers['Sub_address']; ?> <?php echo $row_rsSubscribers['Sub_city']; ?> <?php echo $row_rsSubscribers['Sub_state']; ?>, <?php echo $row_rsSubscribers['Sub_zip']; ?></td> <td align="center"><input <?php if (!(strcmp($row_rsSubscribers['Sub_paidbycheck'],1))) {echo "checked=\"checked\"";} ?> name="Sub_paidbycheck" type="checkbox" value=""></td> <td><?php echo $row_rsSubscribers['Sub_payment_amount']; ?></td> <td><?php echo $row_rsSubscribers['Sub_tranxID']; ?></td> Code starts here <td><?php $name = $_GET["Sub_tranxID"]; $sql = "SELECT `amount` FROM dc_donations WHERE transaction_id='$name'"; $result = mysql_query($sql); $row=mysql_fetch_array($result) This is line 224 $value = $row[0]; ;?></td> Code ends here <td><?php echo $row_rsSubscribers['Sub_date']; ?></td> <td align="center"><input <?php if (!(strcmp($row_rsSubscribers['Sub_nopaper'],1))) {echo "checked=\"checked\"";} ?> name="Sub_nopaper" type="checkbox" value=""></td> <td> </td> </tr> <?php } // Show if recordset not empty ?> <?php } while ($row_rsSubscribers = mysql_fetch_assoc($rsSubscribers)); ?> <?php if ($totalRows_rsSubscribers == 0) { // Show if recordset empty ?> Here is the error I am getting. Parse error: syntax error, unexpected T_VARIABLE in /...../admin-memberadmin-list.php on line 224 Hope someone has a solution Thank you for your help.
  5. Members can be in up to three different categories, primary, secondary and tertiary. What I would like to do is have all members show in the result of a query string that looks for all members in a specific category no matter if it is their primary, secondary and tertiary category. Example: If say a visitor is looking for all members whose business category = 5 it will find and list all members whose BizCat1, BizCat2 OR BizCat3 equals 5 Right now I have this query string that finds all members in the members table with a BizCat1 = to %s. %s is a URLpararmeter variable passed over to the page. $query_RSwbamembers = sprintf("SELECT * FROM members WHERE BizCat1 = %s AND LiveOnWeb = 1 ORDER BY BusinessName ASC", GetSQLValueString($colname_RSwbamembers, "int")); I would like the query result to also includes members whose BiZCat2 = %s or BiZCat3 = %s (the same value as BizCat1) which are additional fields in the table. Any suggestion on how to do this appreciated.
  6. Hi, I have this code for searching records in a MYSQL database. I would like to filter the results based on the value of the checkbox field "LiveOnWeb which equals 1. For some reason it is not filtering the results. All records matching the "LIKE" conditions show in the results. Here is the select statement: "SELECT * FROM members WHERE LiveOnWeb = 1 AND BusinessName LIKE '%{$searchTermDB}%' OR BusinessDescription LIKE '%{$searchTermDB}%' OR SearchKeyWords LIKE '%{$searchTermDB}%' ORDER BY BusinessName"; The statement "WHERE LiveOnWeb = 1" works on other pages but not here. Any ideas? Thanks for your help.
  7. I am not sure we can get this script to work the way I want. There is additional code in a support file that seems to be messing things up. The originators of the script won't modify it. Is there suggestion of a script that might work? I need to send e-mail messages to each person in the data base. There cannot be multiple address in the To field or the relay server will strip them. Bcc and Cc work but need to be sent only when those fields are not empty. Otherwise skip over them. The e-mail message can be text or html and could contain attachments. any ideas?
  8. Using an array, would the result be that all the addresses be in a string like To: 'Pri_EmailAddress', 'Sec_EmailAddress', 'Tri_EmailAddress' ? Or, would they be separated into To: 'Pri_EmailAddress', Cc: 'Sec_EmailAddress', and Bcc:'Tri_EmailAddress'? They cannot be in a string after the To because the relay mail server will strip off the second and third addresses. Also, keep in mind I am a newbie as this and could you be more specific in how to setup the code in the array? Thank you again for your help.
  9. I understand. In this case however both the Cc and the Bcc are part of the same business so it is fine. Most of the records only have a Primary e-mail address. A few have a Secondary e-mail address populated and even less have the Third e-mail address. Since the database table containing the e-mail addresses also contains all other information about that business including the type of business, location, etc as well as membership information, in this case I think it is best to do everything from the one central database. Is there a way we can make it work using the code $sm1->setTo($row_RSemail['BusinessName'], $row_RSemail['Pri_EmailAddress']); if ( $row_RSemail['Sec_EmailAddress'] != NULL ) { $sm1->setCc($row_RSemail['BusinessName'], $row_RSemail['Sec_EmailAddress']); } if ( $row_RSemail['Tri_EmailAddress'] != NULL ) { $sm1->setBcc($row_RSemail['BusinessName'], $row_RSemail['Tri_EmailAddress']); } $sm1->setSubject("".$_POST['emailsubject'].""); Or something similar? Here is a link to the site so you can see what I mean, http://www.wildwoodba.org/ Thank you for your help and your continued interest in this issue.
  10. Question, will your array put all three addresses into a string? If so, the relay server at the host will ignore all but the first. For instance I tried this $query_RSemail = "SELECT *, CONCAT_WS(' ', emailtest.Pri_EmailAddress, emailtest.Sec_EmailAddress, emailtest.Tri_EmailAddress) AS EmailTo FROM emailtest WHERE LiveOnWeb = 1"; and it worked but not when I switched to the smtp relay server which I need to do to send messages to the organizations 100 plus member. It will let the Cc and bcc addresses go through however. That's why I was trying to do it that way.
  11. Thanks for your help. Yes, the same e-mail goes to all addresses. The database field for Cc and Bcc are empty (no data). They show as NULL in the the database management tool by Starfield. I can e-mail you a printout of the database table I am using for test if that will help. Right now the script sort of works, but in a weird way. It sends the To message ok but also sends a Cc and Bcc even though those fields are empty for that record. I tried removing the "echo" from the code and it still does the same thing.
  12. Well, that might be the problem. I have used this if statement elsewhere on the site and it works there. Example: <?php if ( $row_RSwbamembers['MapLocation'] != NULL ) { echo "<a href=\"{$row_RSwbamembers['MapLocation']}\" target=_blank>Map</a> <br />"; } ?> In this case the To and Cc and Bcc addresses, if they exist, are all three in the same record. I want to send the same e-mail message to them as well. So, I tried "hacking" the working code into the script that sends the mail. Bottom line, I only want to populate the Cc and Bcc lines if they have data, otherwise skip over them. I am sure there is a better way to do this. Any ideas? Thank you for your help on this.
  13. The basic code came from SmartMailer for php. It works fine but I'm trying to add the Cc and Bcc addresses to it. The code I have added is this. if ( $row_RSemail['Sec_EmailAddress'] != NULL ) { echo $sm1->setCc($row_RSemail['BusinessName'], $row_RSemail['Sec_EmailAddress']); } if ( $row_RSemail['Tri_EmailAddress'] != NULL ) { echo $sm1->setBcc($row_RSemail['BusinessName'], $row_RSemail['Tri_EmailAddress']); } I think the problem is in the "if" and echo statements. I only want to send a Cc or Bcc if the field is populated in the database, otherwise skip over it. Hope that makes sense.
×
×
  • 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.