将数据从sql发送到电子邮件 [英] send data from sql to email

查看:93
本文介绍了将数据从sql发送到电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家都希望一切顺利。在我遇到的问题上,我需要你宝贵的专业知识。我将尝试在下面解释。


我有一个表格,在那个表格里面我有一个选择一个州。选项:

Hi everyone hope all well. I am needing your valuable expertise in a problem i am having. I will try to explain below.

I have a form and inside of that form i have a "select a state" option:

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案


i希望他们拿走我的mysql数据库并从表中提取一个ip地址
i want them to get taken my mysql database and pull an ip address from the table



我没有看到问题。只是在发送邮件之前查询你的数据库。

I don?t see a problem with that. just query your DB before sending the mail.


它还需要从Alabama中随机选择一个ip,因为在数据库中我有Alabama(AL)多个次
It also needs to randomly choose an ip from Alabama because in the database i have Alabama (AL) multiple times



这通常通过 ORDER BY RAND()LIMIT 1

来完成

嘿Dormilich感谢您的回复,并在延迟时感到抱歉。我查看了查询数据库,我发现这可能对我有帮助

Hey Dormilich thanks for your reply and sorry in the delay. I had a look into query DB and i found this that might help me

展开 | 选择 | Wrap < span class =codeDivider> | 行号


你需要正确在你可以使用任何数据库功能之前打开数据库连接。


那里还有更安全(和更现代)的方式与数据库通信:
you need to properly open the DB connection before you can use any of the DB functions.

there?s also a safer (and more modern) way to talk to the DB:
展开 | 选择 | Wrap | 行号


这篇关于将数据从sql发送到电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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