davej Posted May 3, 2014 Share Posted May 3, 2014 So try... $sql1 = "SELECT * FROM sales where cid='$cid' ORDER BY date,svn,rn"; Link to comment Share on other sites More sharing options...
funbinod Posted May 3, 2014 Author Share Posted May 3, 2014 So try... $sql1 = "SELECT * FROM sales where cid='$cid' ORDER BY date,svn,rn"; but how does that get the "BALANCE" information. my query is ready for anything else. i wish some string to get BALANCE column Link to comment Share on other sites More sharing options...
davej Posted May 3, 2014 Share Posted May 3, 2014 It doesn't, but since you're printing it out anyway with Php why not just do it in Php? Otherwise I think you'd have to use a SQL cursor. Link to comment Share on other sites More sharing options...
funbinod Posted May 3, 2014 Author Share Posted May 3, 2014 i printed everything else in php except BALANCE. i'm ok to use SQL cursor. please guide Link to comment Share on other sites More sharing options...
davej Posted May 3, 2014 Share Posted May 3, 2014 You should just use Php. If you want to play with cursors then see... https://www.google.com/#q=mysql+cursor+examples Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now