Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » U++ SQL Begginer
Re: U++ SQL Begginer [message #17365 is a reply to message #17325] Sat, 09 August 2008 10:09 Go to previous messageGo to previous message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thanks captainc

but please can any one help me Understanding this code

void SQLApp::Query()
{
	SqlBool where;
	SqlSet borrowed = Select(BOOK_ID).From(BORROW_RECORD).Where(IsNull(RETURNED));
	if(query.status == 1)
		where = ID != borrowed;
	if(query.status == 2)
		where = ID == borrowed;
	SqlBool bdate;
	if(!IsNull(query.borrowed_from))
		bdate = BORROWED >= ~query.borrowed_from;
	if(!IsNull(query.borrowed_to))
		bdate = bdate && BORROWED <= ~query.borrowed_to;
	if(!bdate.IsEmpty())
		where = where && ID == Select(BOOK_ID).From(BORROW_RECORD).Where(bdate);
	book.Query(where);
}


it's from SQLApp Example
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SQL_ProgreSQL example building problems
Next Topic: SQL statment in constructor make program crash
Goto Forum:
  


Current Time: Tue Jul 15 16:12:53 CEST 2025

Total time taken to generate the page: 0.02938 seconds