help me with the following sql query
Posted
by rupeshmalviya
on Stack Overflow
See other posts from Stack Overflow
or by rupeshmalviya
Published on 2010-06-13T04:54:18Z
Indexed on
2010/06/13
5:02 UTC
Read the original article
Hit count: 178
mysql
could somebody correct my following query, i am novice to software development realm, i am to a string builder object in comma separated form to my query but it's not producing desired result qyery is as follows and string cmd = "SELECT * FROM [placed_student] WHERE passout_year=@passout AND company_id=@companyId AND course_id=@courseId AND branch_id IN('" + sb + "')";
StringBuilder sb = new
StringBuilder();
foreach (ListItem li in branch.Items)
{
if (li.Selected == true)
{
sb.Append(Convert.ToInt32(li.Value)
+", ");
}
}
li is integer value of my check box list which are getting generated may be differne at different time ...please also suggest me some good source to learn sql..
© Stack Overflow or respective owner