数据库相关问题 [英] database related question

查看:97
本文介绍了数据库相关问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我发送电子邮件至no。 customer.i不知道我发送了哪个客户或者我不发送哪个客户。所以我认为,在客户信息表中我还添加邮件字段,用它来发送邮件。发送邮件后发送更新mail send.so它帮我发送所有客户发送邮件而不留下任何其他客户。

但不知道我是如何使用编码完成此操作的。请帮助我

while i send email to no. of customer.i don't know which customer i send or which customer i don't send.so only i think,in customer information table i also add mail field, by using it to send mail.After send the mail that field update mail send.so its help me to send all the customer to send mail without leaving anyother customer.
But don't know how i done this by using coding..please help me

推荐答案

在编码中也是如此。您在数据库中添加另一个字段,表示您是否已将电子邮件发送给客户。



在您的数据库中,尝试添加另一个字段(布尔类型; SQL中的位)并将其命名为EmailSent。它会表示您是否已将电子邮件发送给此客户。如果您已发送电子邮件,请将其设置为true,否则将其设置为false。



您可以学习使用SQL Server,以及如何使用SQL语言操作数据。一旦您提取了所有结果,您就可以使用这些结果将电子邮件发送给那些电子邮件的EmailSent值为false的客户(客户)。



另一个提示:既然,你没有表示有兴趣告诉你是否向所有客户分享了类似的电子邮件,或者你发送了一封电子邮件作为回应或者是什么 - 所以,永远。我想补充一点,如果您要向所有客户发送类似版本的电子邮件。请使用迭代结构;循环,一个for或一个while循环,一次向所有客户发送电子邮件。这样,您甚至不必存储发送的电子邮件或不存储值。其次,如果您要发送常规电子邮件,那么您应该存储日期时间 [ ^ ]值,以便下次使用该值发送电子邮件。例如,您可以存储今天向客户发送电子邮件的时间值,以便在24小时后再次发送电子邮件等等。
It is done just similarly in coding. You add another field in the database, that would denote whether you've sent the email to the customer or not.

In your database, try adding another field (of a boolean type; bit in SQL) and name it EmailSent. It would denote whether you've sent the email to this customer or not. If you've sent the email, set it to true otherwise set it to false.

You can learn working with SQL Server, and how to manipulate the data using SQL language. Once you've extracted all of the results, you can then use these results to send the email to those clients (customers) who have the EmailSent value to false for your email.

Another tip: Since, you've not shown any interest in telling whether you share the similar email to all of your clients or you sent an email in response or what-so-ever. I would like to add, that if you're going to send a similar version of email to all of the clients. Please use an iteration structure; looping, either a for or a while loop to send email to all of the customers in one time. This way, you won't even have to store the email sent or not value either. Secondly, if you're going to send a regular-base email, then you should store the DateTime[^] value to use the value to send the email next time. For example, you can store the value of when you sent the email to a client today, so that after exact 24 hours you would again send the email and so on.


这篇关于数据库相关问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆