Version 18.11.11

This commit is contained in:
Antonio Cañas Vargas 2018-11-01 12:02:58 +01:00
parent 041715432f
commit 2540212d8c
4 changed files with 162 additions and 131 deletions

View File

@ -107,10 +107,10 @@ void MFU_GetMFUActions (struct MFU_ListMFUActions *ListMFUActions,unsigned MaxAc
Act_Action_t Action; Act_Action_t Action;
/***** Get most frequently used actions *****/ /***** Get most frequently used actions *****/
DB_BuildQuery ("SELECT ActCod FROM actions_MFU" NumRows = DB_QuerySELECT (&mysql_res,"can not get most frequently used actions",
" WHERE UsrCod=%ld ORDER BY Score DESC,LastClick DESC", "SELECT ActCod FROM actions_MFU"
Gbl.Usrs.Me.UsrDat.UsrCod); " WHERE UsrCod=%ld ORDER BY Score DESC,LastClick DESC",
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get most frequently used actions"); Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Write list of frequently used actions *****/ /***** Write list of frequently used actions *****/
for (NumRow = 0, ListMFUActions->NumActions = 0; for (NumRow = 0, ListMFUActions->NumActions = 0;
@ -150,11 +150,13 @@ Act_Action_t MFU_GetMyLastActionInCurrentTab (void)
if (Gbl.Usrs.Me.UsrDat.UsrCod > 0) if (Gbl.Usrs.Me.UsrDat.UsrCod > 0)
{ {
/***** Get my most frequently used actions *****/ /***** Get my most frequently used actions *****/
DB_BuildQuery ("SELECT ActCod FROM actions_MFU" NumActions =
" WHERE UsrCod=%ld" (unsigned) DB_QuerySELECT (&mysql_res,"can not get"
" ORDER BY LastClick DESC,Score DESC", " most frequently used actions",
Gbl.Usrs.Me.UsrDat.UsrCod); "SELECT ActCod FROM actions_MFU"
NumActions = (unsigned) DB_QuerySELECT_new (&mysql_res,"can not get most frequently used actions"); " WHERE UsrCod=%ld"
" ORDER BY LastClick DESC,Score DESC",
Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Loop over list of frequently used actions *****/ /***** Loop over list of frequently used actions *****/
for (NumAct = 0; for (NumAct = 0;
@ -352,10 +354,10 @@ void MFU_UpdateMFUActions (void)
Str_SetDecimalPointToUS (); // To get the decimal point as a dot Str_SetDecimalPointToUS (); // To get the decimal point as a dot
/***** Get current score *****/ /***** Get current score *****/
DB_BuildQuery ("SELECT Score FROM actions_MFU" if (DB_QuerySELECT (&mysql_res,"can not get score for current action",
" WHERE UsrCod=%ld AND ActCod=%ld", "SELECT Score FROM actions_MFU"
Gbl.Usrs.Me.UsrDat.UsrCod,ActCod); " WHERE UsrCod=%ld AND ActCod=%ld",
if (DB_QuerySELECT_new (&mysql_res,"can not get score for current action")) Gbl.Usrs.Me.UsrDat.UsrCod,ActCod))
{ {
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
if (sscanf (row[0],"%f",&Score) != 1) if (sscanf (row[0],"%f",&Score) != 1)

View File

@ -355,10 +355,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.11.10 (2018-11-01)" #define Log_PLATFORM_VERSION "SWAD 18.11.11 (2018-11-01)"
#define CSS_FILE "swad18.4.css" #define CSS_FILE "swad18.4.css"
#define JS_FILE "swad17.17.1.js" #define JS_FILE "swad17.17.1.js"
/* /*
Version 18.11.11: Nov 01, 2018 Joining building and performing query into one function. (235896 lines)
Version 18.11.10: Nov 01, 2018 Joining building and performing query into one function. (235861 lines) Version 18.11.10: Nov 01, 2018 Joining building and performing query into one function. (235861 lines)
Version 18.11.9: Oct 31, 2018 Joining building and performing query into one function. (235847 lines) Version 18.11.9: Oct 31, 2018 Joining building and performing query into one function. (235847 lines)
Version 18.11.8: Oct 31, 2018 Joining building and performing query into one function. (235810 lines) Version 18.11.8: Oct 31, 2018 Joining building and performing query into one function. (235810 lines)

View File

@ -2659,18 +2659,18 @@ static void Msg_GetMsgSntData (long MsgCod,long *CrsCod,long *UsrCod,
/***** Get data of message from table msg_snt *****/ /***** Get data of message from table msg_snt *****/
*Deleted = false; *Deleted = false;
DB_BuildQuery ("SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)" NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a message",
" FROM msg_snt WHERE MsgCod=%ld", "SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)"
MsgCod); " FROM msg_snt WHERE MsgCod=%ld",
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get data of a message"); MsgCod);
if (NumRows == 0) // If not result ==> sent message is deleted if (NumRows == 0) // If not result ==> sent message is deleted
{ {
/***** Get data of message from table msg_snt_deleted *****/ /***** Get data of message from table msg_snt_deleted *****/
DB_BuildQuery ("SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)" NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a message",
" FROM msg_snt_deleted WHERE MsgCod=%ld", "SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)"
MsgCod); " FROM msg_snt_deleted WHERE MsgCod=%ld",
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get data of a message"); MsgCod);
*Deleted = true; *Deleted = true;
} }
@ -2708,10 +2708,10 @@ void Msg_GetMsgSubject (long MsgCod,char Subject[Cns_MAX_BYTES_SUBJECT + 1])
MYSQL_ROW row; MYSQL_ROW row;
/***** Get subject of message from database *****/ /***** Get subject of message from database *****/
DB_BuildQuery ("SELECT Subject FROM msg_content WHERE MsgCod=%ld",MsgCod); if (DB_QuerySELECT (&mysql_res,"can not get the subject of a message",
"SELECT Subject FROM msg_content"
/***** Result should have a unique row *****/ " WHERE MsgCod=%ld",
if (DB_QuerySELECT_new (&mysql_res,"can not get the subject of a message") == 1) MsgCod) == 1) // Result should have a unique row
{ {
/***** Get subject *****/ /***** Get subject *****/
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
@ -2737,10 +2737,10 @@ static void Msg_GetMsgContent (long MsgCod,char Content[Cns_MAX_BYTES_LONG_TEXT
unsigned long NumRows; unsigned long NumRows;
/***** Get content of message from database *****/ /***** Get content of message from database *****/
DB_BuildQuery ("SELECT Content,ImageName,ImageTitle,ImageURL" NumRows = DB_QuerySELECT (&mysql_res,"can not get the content of a message",
" FROM msg_content WHERE MsgCod=%ld", "SELECT Content,ImageName,ImageTitle,ImageURL"
MsgCod); " FROM msg_content WHERE MsgCod=%ld",
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get the content of a message"); MsgCod);
/***** Result should have a unique row *****/ /***** Result should have a unique row *****/
if (NumRows != 1) if (NumRows != 1)
@ -2771,10 +2771,11 @@ static void Msg_GetStatusOfSentMsg (long MsgCod,bool *Expanded)
unsigned long NumRows; unsigned long NumRows;
/***** Get if sent message has been replied/expanded from database *****/ /***** Get if sent message has been replied/expanded from database *****/
DB_BuildQuery ("SELECT Expanded FROM msg_snt" NumRows = DB_QuerySELECT (&mysql_res,"can not get if a sent message"
" WHERE MsgCod=%ld AND UsrCod=%ld", " has been replied/expanded",
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod); "SELECT Expanded FROM msg_snt"
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get if a sent message has been replied/expanded"); " WHERE MsgCod=%ld AND UsrCod=%ld",
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Result should have a unique row *****/ /***** Result should have a unique row *****/
if (NumRows != 1) if (NumRows != 1)
@ -2801,10 +2802,11 @@ static void Msg_GetStatusOfReceivedMsg (long MsgCod,bool *Open,bool *Replied,boo
unsigned long NumRows; unsigned long NumRows;
/***** Get if received message has been replied/expanded from database *****/ /***** Get if received message has been replied/expanded from database *****/
DB_BuildQuery ("SELECT Open,Replied,Expanded FROM msg_rcv" NumRows = DB_QuerySELECT (&mysql_res,"can not get if a received message"
" WHERE MsgCod=%ld AND UsrCod=%ld", " has been replied/expanded",
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod); "SELECT Open,Replied,Expanded FROM msg_rcv"
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get if a received message has been replied/expanded"); " WHERE MsgCod=%ld AND UsrCod=%ld",
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Result should have a unique row *****/ /***** Result should have a unique row *****/
if (NumRows != 1) if (NumRows != 1)
@ -3021,11 +3023,11 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
// This function may be called inside a web service, so don't report error // This function may be called inside a web service, so don't report error
/***** Get subject of message from database *****/ /***** Get subject of message from database *****/
DB_BuildQuery ("SELECT Subject,Content FROM msg_content" if (DB_QuerySELECT (&mysql_res,"can not get subject and content"
" WHERE MsgCod=%ld", " of a message",
MsgCod); "SELECT Subject,Content FROM msg_content"
" WHERE MsgCod=%ld",
if (DB_QuerySELECT_new (&mysql_res,"can not get subject and content of a message") == 1) // Result should have a unique row MsgCod) == 1) // Result should have a unique row
{ {
/***** Get subject and content of the message *****/ /***** Get subject and content of the message *****/
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
@ -3378,18 +3380,29 @@ static void Msg_WriteMsgTo (long MsgCod)
NumRecipientsTotal = (unsigned) DB_QueryCOUNT_new ("can not get number of recipients"); NumRecipientsTotal = (unsigned) DB_QueryCOUNT_new ("can not get number of recipients");
/***** Get recipients of a message from database *****/ /***** Get recipients of a message from database *****/
DB_BuildQuery ("(SELECT msg_rcv.UsrCod,'N',msg_rcv.Open," NumRecipientsKnown =
"usr_data.Surname1 AS S1,usr_data.Surname2 AS S2,usr_data.FirstName AS FN" (unsigned) DB_QuerySELECT (&mysql_res,"can not get recipients of a message",
" FROM msg_rcv,usr_data" "(SELECT msg_rcv.UsrCod,"
" WHERE msg_rcv.MsgCod=%ld AND msg_rcv.UsrCod=usr_data.UsrCod)" "'N',"
" UNION " "msg_rcv.Open,"
"(SELECT msg_rcv_deleted.UsrCod,'Y',msg_rcv_deleted.Open," "usr_data.Surname1 AS S1,"
"usr_data.Surname1 AS S1,usr_data.Surname2 AS S2,usr_data.FirstName AS FN" "usr_data.Surname2 AS S2,"
" FROM msg_rcv_deleted,usr_data" "usr_data.FirstName AS FN"
" WHERE msg_rcv_deleted.MsgCod=%ld AND msg_rcv_deleted.UsrCod=usr_data.UsrCod)" " FROM msg_rcv,usr_data"
" ORDER BY S1,S2,FN", " WHERE msg_rcv.MsgCod=%ld"
MsgCod,MsgCod); " AND msg_rcv.UsrCod=usr_data.UsrCod)"
NumRecipientsKnown = (unsigned) DB_QuerySELECT_new (&mysql_res,"can not get recipients of a message"); " UNION "
"(SELECT msg_rcv_deleted.UsrCod,"
"'Y',"
"msg_rcv_deleted.Open,"
"usr_data.Surname1 AS S1,"
"usr_data.Surname2 AS S2,"
"usr_data.FirstName AS FN"
" FROM msg_rcv_deleted,usr_data"
" WHERE msg_rcv_deleted.MsgCod=%ld"
" AND msg_rcv_deleted.UsrCod=usr_data.UsrCod)"
" ORDER BY S1,S2,FN",
MsgCod,MsgCod);
/***** Check number of recipients *****/ /***** Check number of recipients *****/
if (NumRecipientsTotal) if (NumRecipientsTotal)
@ -3748,12 +3761,15 @@ void Msg_ListBannedUsrs (void)
char PhotoURL[PATH_MAX + 1]; char PhotoURL[PATH_MAX + 1];
/***** Get my banned users *****/ /***** Get my banned users *****/
DB_BuildQuery ("SELECT msg_banned.FromUsrCod FROM msg_banned,usr_data" NumUsrs = (unsigned) DB_QuerySELECT (&mysql_res,"can not get banned users",
" WHERE msg_banned.ToUsrCod=%ld" "SELECT msg_banned.FromUsrCod"
" AND msg_banned.FromUsrCod=usr_data.UsrCod" " FROM msg_banned,usr_data"
" ORDER BY usr_data.Surname1,usr_data.Surname2,usr_data.FirstName", " WHERE msg_banned.ToUsrCod=%ld"
Gbl.Usrs.Me.UsrDat.UsrCod); " AND msg_banned.FromUsrCod=usr_data.UsrCod"
NumUsrs = (unsigned) DB_QuerySELECT_new (&mysql_res,"can not get banned users"); " ORDER BY usr_data.Surname1,"
"usr_data.Surname2,"
"usr_data.FirstName",
Gbl.Usrs.Me.UsrDat.UsrCod);
if (NumUsrs == 0) // If not result ==> sent message is deleted if (NumUsrs == 0) // If not result ==> sent message is deleted
Ale_ShowAlert (Ale_INFO,Txt_You_have_not_banned_any_sender); Ale_ShowAlert (Ale_INFO,Txt_You_have_not_banned_any_sender);

View File

@ -222,13 +222,11 @@ void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat)
NumURL < Net_NUM_WEBS_AND_SOCIAL_NETWORKS; NumURL < Net_NUM_WEBS_AND_SOCIAL_NETWORKS;
NumURL++) NumURL++)
{ {
/***** Get user's web / social network from database *****/
DB_BuildQuery ("SELECT URL FROM usr_webs"
" WHERE UsrCod=%ld AND Web='%s'",
UsrDat->UsrCod,Net_WebsAndSocialNetworksDB[NumURL]);
/***** Check if exists the web / social network for this user *****/ /***** Check if exists the web / social network for this user *****/
if (DB_QuerySELECT_new (&mysql_res,"can not get user's web / social network")) if (DB_QuerySELECT (&mysql_res,"can not get user's web / social network",
"SELECT URL FROM usr_webs"
" WHERE UsrCod=%ld AND Web='%s'",
UsrDat->UsrCod,Net_WebsAndSocialNetworksDB[NumURL]))
{ {
/* Get URL */ /* Get URL */
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
@ -301,13 +299,11 @@ void Net_ShowFormMyWebsAndSocialNets (void)
NumURL++) NumURL++)
{ {
/***** Get user's web / social network from database *****/ /***** Get user's web / social network from database *****/
DB_BuildQuery ("SELECT URL FROM usr_webs" if (DB_QuerySELECT (&mysql_res,"can not get user's web / social network",
" WHERE UsrCod=%ld AND Web='%s'", "SELECT URL FROM usr_webs"
Gbl.Usrs.Me.UsrDat.UsrCod, " WHERE UsrCod=%ld AND Web='%s'",
Net_WebsAndSocialNetworksDB[NumURL]); Gbl.Usrs.Me.UsrDat.UsrCod,
Net_WebsAndSocialNetworksDB[NumURL]))
/***** Check number of rows in result *****/
if (DB_QuerySELECT_new (&mysql_res,"can not get user's web / social network"))
{ {
/***** Read the data comunes a all the users *****/ /***** Read the data comunes a all the users *****/
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
@ -437,7 +433,7 @@ void Net_ShowWebAndSocialNetworksStats (void)
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;
unsigned NumRows; unsigned NumRows = 0; // Initialized to avoid warning
unsigned NumRow; unsigned NumRow;
Net_WebsAndSocialNetworks_t Web; Net_WebsAndSocialNetworks_t Web;
char NetName[Net_MAX_BYTES_NETWORK_NAME + 1]; char NetName[Net_MAX_BYTES_NETWORK_NAME + 1];
@ -455,77 +451,93 @@ void Net_ShowWebAndSocialNetworksStats (void)
switch (Gbl.Scope.Current) switch (Gbl.Scope.Current)
{ {
case Sco_SCOPE_SYS: case Sco_SCOPE_SYS:
DB_BuildQuery ("SELECT Web,COUNT(*) AS N" NumRows =
" FROM usr_webs" (unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
" GROUP BY Web" " with webs / social networks",
" ORDER BY N DESC,Web"); "SELECT Web,COUNT(*) AS N"
" FROM usr_webs"
" GROUP BY Web"
" ORDER BY N DESC,Web");
break; break;
case Sco_SCOPE_CTY: case Sco_SCOPE_CTY:
DB_BuildQuery ("SELECT usr_webs.Web," NumRows =
"COUNT(DISTINCT usr_webs.UsrCod) AS N" (unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
" FROM institutions,centres,degrees,courses,crs_usr,usr_webs" " with webs / social networks",
" WHERE institutions.CtyCod=%ld" "SELECT usr_webs.Web,"
" AND institutions.InsCod=centres.InsCod" "COUNT(DISTINCT usr_webs.UsrCod) AS N"
" AND centres.CtrCod=degrees.CtrCod" " FROM institutions,centres,degrees,courses,crs_usr,usr_webs"
" AND degrees.DegCod=courses.DegCod" " WHERE institutions.CtyCod=%ld"
" AND courses.CrsCod=crs_usr.CrsCod" " AND institutions.InsCod=centres.InsCod"
" AND crs_usr.UsrCod=usr_webs.UsrCod" " AND centres.CtrCod=degrees.CtrCod"
" GROUP BY usr_webs.Web" " AND degrees.DegCod=courses.DegCod"
" ORDER BY N DESC,usr_webs.Web", " AND courses.CrsCod=crs_usr.CrsCod"
Gbl.CurrentCty.Cty.CtyCod); " AND crs_usr.UsrCod=usr_webs.UsrCod"
" GROUP BY usr_webs.Web"
" ORDER BY N DESC,usr_webs.Web",
Gbl.CurrentCty.Cty.CtyCod);
break; break;
case Sco_SCOPE_INS: case Sco_SCOPE_INS:
DB_BuildQuery ("SELECT usr_webs.Web," NumRows =
"COUNT(DISTINCT usr_webs.UsrCod) AS N" (unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
" FROM centres,degrees,courses,crs_usr,usr_webs" " with webs / social networks",
" WHERE centres.InsCod=%ld" "SELECT usr_webs.Web,"
" AND centres.CtrCod=degrees.CtrCod" "COUNT(DISTINCT usr_webs.UsrCod) AS N"
" AND degrees.DegCod=courses.DegCod" " FROM centres,degrees,courses,crs_usr,usr_webs"
" AND courses.CrsCod=crs_usr.CrsCod" " WHERE centres.InsCod=%ld"
" AND crs_usr.UsrCod=usr_webs.UsrCod" " AND centres.CtrCod=degrees.CtrCod"
" GROUP BY usr_webs.Web" " AND degrees.DegCod=courses.DegCod"
" ORDER BY N DESC,usr_webs.Web", " AND courses.CrsCod=crs_usr.CrsCod"
Gbl.CurrentIns.Ins.InsCod); " AND crs_usr.UsrCod=usr_webs.UsrCod"
" GROUP BY usr_webs.Web"
" ORDER BY N DESC,usr_webs.Web",
Gbl.CurrentIns.Ins.InsCod);
break; break;
case Sco_SCOPE_CTR: case Sco_SCOPE_CTR:
DB_BuildQuery ("SELECT usr_webs.Web," NumRows =
"COUNT(DISTINCT usr_webs.UsrCod) AS N" (unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
" FROM degrees,courses,crs_usr,usr_webs" " with webs / social networks",
" WHERE degrees.CtrCod=%ld" "SELECT usr_webs.Web,"
" AND degrees.DegCod=courses.DegCod" "COUNT(DISTINCT usr_webs.UsrCod) AS N"
" AND courses.CrsCod=crs_usr.CrsCod" " FROM degrees,courses,crs_usr,usr_webs"
" AND crs_usr.UsrCod=usr_webs.UsrCod" " WHERE degrees.CtrCod=%ld"
" GROUP BY usr_webs.Web" " AND degrees.DegCod=courses.DegCod"
" ORDER BY N DESC,usr_webs.Web", " AND courses.CrsCod=crs_usr.CrsCod"
Gbl.CurrentCtr.Ctr.CtrCod); " AND crs_usr.UsrCod=usr_webs.UsrCod"
" GROUP BY usr_webs.Web"
" ORDER BY N DESC,usr_webs.Web",
Gbl.CurrentCtr.Ctr.CtrCod);
break; break;
case Sco_SCOPE_DEG: case Sco_SCOPE_DEG:
DB_BuildQuery ("SELECT usr_webs.Web," NumRows =
"COUNT(DISTINCT usr_webs.UsrCod) AS N" (unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
" FROM courses,crs_usr,usr_webs" " with webs / social networks",
" WHERE courses.DegCod=%ld" "SELECT usr_webs.Web,"
" AND courses.CrsCod=crs_usr.CrsCod" "COUNT(DISTINCT usr_webs.UsrCod) AS N"
" AND crs_usr.UsrCod=usr_webs.UsrCod" " FROM courses,crs_usr,usr_webs"
" GROUP BY usr_webs.Web" " WHERE courses.DegCod=%ld"
" ORDER BY N DESC,usr_webs.Web", " AND courses.CrsCod=crs_usr.CrsCod"
Gbl.CurrentDeg.Deg.DegCod); " AND crs_usr.UsrCod=usr_webs.UsrCod"
" GROUP BY usr_webs.Web"
" ORDER BY N DESC,usr_webs.Web",
Gbl.CurrentDeg.Deg.DegCod);
break; break;
case Sco_SCOPE_CRS: case Sco_SCOPE_CRS:
DB_BuildQuery ("SELECT usr_webs.Web," NumRows =
"COUNT(DISTINCT usr_webs.UsrCod) AS N" (unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
" FROM crs_usr,usr_webs" " with webs / social networks",
" WHERE crs_usr.CrsCod=%ld" "SELECT usr_webs.Web,"
" AND crs_usr.UsrCod=usr_webs.UsrCod" "COUNT(DISTINCT usr_webs.UsrCod) AS N"
" GROUP BY usr_webs.Web" " FROM crs_usr,usr_webs"
" ORDER BY N DESC,usr_webs.Web", " WHERE crs_usr.CrsCod=%ld"
Gbl.CurrentCrs.Crs.CrsCod); " AND crs_usr.UsrCod=usr_webs.UsrCod"
" GROUP BY usr_webs.Web"
" ORDER BY N DESC,usr_webs.Web",
Gbl.CurrentCrs.Crs.CrsCod);
break; break;
default: default:
Lay_WrongScopeExit (); Lay_WrongScopeExit ();
break; break;
} }
NumRows = (unsigned) DB_QuerySELECT_new (&mysql_res,
"can not get number of users with webs / social networks");
/***** Start box and table *****/ /***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_SOCIAL_NETWORKS],NULL, Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_SOCIAL_NETWORKS],NULL,