You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Express
in my project.i use mysql like this:
var user = { getAllUserList:'select * from ad_user where name = ? and address = ?' }
and i can get result list this:
var query = connection.query(user.select,[param.name,param.address],function(err,result){
if(result){ .... } });
but if i only have one parameter,Name or addresss.How to write the sql.
Regards,
Jiff Han
Ryan Schmidt
unread,
Jan 9, 2016, 6:54:24 AM1/9/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to expre...@googlegroups.com
Well, if you only have the parameter "name", then the SQL would be "SELECT * FROM ad_user WHERE name = ?" and you would invoke connection.query(user.select, [param.name], function (err, result) {...});
梁少峰
unread,
Mar 13, 2016, 10:50:57 AM3/13/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Express
What about define two sql query? One for select name,anthor for select address.
You can choose which sql query to use according to the param.