So I started to work on a site, and the Owner says ‘We use PHP and MySql’, so I say Great! I’ll start tomorrow…Well after poking around the site, I soon find myself in all kinds of messes…
Its a windows Hosting, .net 2.0 running, PHP 5, mssql and mysql server party. So being the dumb person I am, I tell him I will continue to work with his system. Ok now that I rambled…the problem is the .net developer is MIA…and I need to run a simple query againsts the mssql system using one of their pages. .aspx
Ever page seems to have its own aspx.cs page, that seems to have the code in in for the most part. I just want to pull a line out and dump the data to a page with out rewriting the entire page.
hdnStrCondition.Value = strCondition.ToString();
SqlConnection objConn = new SqlConnection();
objConn.ConnectionString = CommonUtil.GetConfigValue("connectionString");
objConn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
string qry = "";
qry += " SELECT convert(varchar(10),pMaster.UserId) +'/'+ isnull(ImageName,' ') as email, pMaster.PropertyId,Title,TypeName,ImagePath,isnull(Bedrooms,'0') as Bedrooms ,isnull(Bathrooms,'0') as Bathrooms,CurrentEstimatedValue,Ptype,";
qry += "Description,Sqft,Floors,YrBuilt,pMaster.city,states.StateName,pMaster.UpgradeToFeaturedProperty,pMaster.Others,pMaster.state,pMaster.OtherState";
qry += " FROM rsnPropertyMaster pMaster LEFT OUTER JOIN rsnPropertyImagePath iMaster on pMaster.PropertyId=iMaster.PropertyId and iMaster.PrimaryFlag = 1 LEFT OUTER JOIN rsnMemberUser uMaster on pMaster.UserId=uMaster.UserId";
qry += " LEFT OUTER JOIN rsnPropertyType type ON type.TypeId=pMaster.PType LEFT OUTER JOIN rsnStates states ON states.Abbreviation =pMaster.State where ";
qry += " " + strCondition;
I guess I just need to know how to get the above to my display.