<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	Comments on: Count users with &#8220;last&#8221;	</title>
	<atom:link href="https://www.krazyworks.com/count-users-with-last/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.krazyworks.com/count-users-with-last/</link>
	<description>Networking, Systems Design, and Disaster Recovery</description>
	<lastBuildDate>Fri, 12 Sep 2014 00:11:23 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.9</generator>
	<item>
		<title>
		By: Jon P		</title>
		<link>https://www.krazyworks.com/count-users-with-last/comment-page-1/#comment-248171</link>

		<dc:creator><![CDATA[Jon P]]></dc:creator>
		<pubDate>Mon, 01 Apr 2013 07:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.comradegeneral.com/SysAdmin/?p=19#comment-248171</guid>

					<description><![CDATA[i&#039;m trying to get the PK of the last record from a table. the catch is, the PK is not auto_incremented. it&#039;s something like A1 where A is the user type (can be A, P, or S)  and 1 is the part that is auto_incremented. in case you&#039;re wondering why it&#039;s like that, it was required of us to do it this way. i can&#039;t use ORDER BY id DESC LIMIT 1 because it doesn&#039;t return the PK of the last record. is there a way to do this?
]]></description>
			<content:encoded><![CDATA[<p>i&#8217;m trying to get the PK of the last record from a table. the catch is, the PK is not auto_incremented. it&#8217;s something like A1 where A is the user type (can be A, P, or S)  and 1 is the part that is auto_incremented. in case you&#8217;re wondering why it&#8217;s like that, it was required of us to do it this way. i can&#8217;t use ORDER BY id DESC LIMIT 1 because it doesn&#8217;t return the PK of the last record. is there a way to do this?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Adam		</title>
		<link>https://www.krazyworks.com/count-users-with-last/comment-page-1/#comment-248084</link>

		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sun, 31 Mar 2013 23:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.comradegeneral.com/SysAdmin/?p=19#comment-248084</guid>

					<description><![CDATA[ok iv had the Nikon Coolpix s550 10 MP digital camera for bout a year and a half. Every time i use the movie mode on it, it always cuts the lst two seconds of sound off of the video. Idk why. it has been pretty annoying in recent times, but i dnt use movie mode that often so it isnt that bad for me. im just wondering why it cuts off the last 2 sec of sound when all their other cameras dont do this. if anyone has insight on this or a fix for it, lemme kno.
]]></description>
			<content:encoded><![CDATA[<p>ok iv had the Nikon Coolpix s550 10 MP digital camera for bout a year and a half. Every time i use the movie mode on it, it always cuts the lst two seconds of sound off of the video. Idk why. it has been pretty annoying in recent times, but i dnt use movie mode that often so it isnt that bad for me. im just wondering why it cuts off the last 2 sec of sound when all their other cameras dont do this. if anyone has insight on this or a fix for it, lemme kno.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Con Orpe		</title>
		<link>https://www.krazyworks.com/count-users-with-last/comment-page-1/#comment-248011</link>

		<dc:creator><![CDATA[Con Orpe]]></dc:creator>
		<pubDate>Sun, 31 Mar 2013 11:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.comradegeneral.com/SysAdmin/?p=19#comment-248011</guid>

					<description><![CDATA[After customer filling the form, the form data will be send to mysql, and an email will sent to me with the last form data that customer submitted. All is working, but only the problem is in the email &quot;last mysql data&quot; is not going as inline text. So, how to do this? I am doing in PHP. In am new in PHP. Please help me. 

See full code - http://halmiratea.com/to-stackoverflow.com-not-personal1.php#problem

&#060;?php

define(&#039;DB_NAME&#039;, &#039;sandi565_form11&#039;);
define(&#039;DB_USER&#039;, &#039;XXXXXXX&#039;);
define(&#039;DB_PASSWORD&#039;, &#039;XXXXXXX&#039;);
define(&#039;DB_HOST&#039;, &#039;localhost&#039;);

$link = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);

if (!$link) {
die(&#039;Could not connect: &#039; . mysql_error());
}

$db_selected = mysql_select_db(DB_NAME, $link);

if (!$db_selected) {
die(&#039;Can&#039;t use &#039; . DB_NAME . &#039;: &#039; . mysql_error());
}

//Start Posting the data in Mysql database from Form Input

$value = $_POST[&#039;input1&#039;];
$value2 = $_POST[&#039;MAmount&#039;];

$sql = &#034;INSERT INTO demo (input1, MAmount) VALUES (&#039;$value&#039;, &#039;$value2&#039;)&#034;;

if (!mysql_query($sql)) {
die(&#039;Error: &#039; . mysql_error());

}

//start print the database

$data = mysql_query(&#034;SELECT * FROM demo ORDER BY ID DESC LIMIT 1&#034;)
 or die(mysql_error()); 
 Print &#034;&quot;; 
 while($info = mysql_fetch_array( $data )) 
 { 
 Print &quot;&quot;; 
 Print &quot;ID: &quot;.$info[&#039;ID&#039;] . &quot; &quot;; 
 Print &quot;Input1: &quot;.$info[&#039;input1&#039;] . &quot; &quot;; 
 Print &quot;MAmount: &quot;.$info[&#039;MAmount&#039;] . &quot; &quot;; 
 } 
 Print &quot;&quot;; 

mysql_close();

  
//end print the database on form processing page
  
//start emailing the data
  

date_default_timezone_set(&#039;Asia/Kolkata&#039;);

require_once(&#039;class.phpmailer.php&#039;);
//include(&quot;class.smtp.php&quot;); // optional, gets called from within class.phpmailer.php if not already loaded

$mail             = new PHPMailer();

//$body             = &quot;gdssdh&quot;;
//$body             = preg_replace(&quot;[]&quot;,&#039;&#039;,$body);

$mail-&#062;IsSMTP(); // telling the class to use SMTP
$mail-&#062;Host       = &quot;ssl://XXXXXXX.XXXXXXX.org&quot;; // SMTP server
$mail-&#062;SMTPDebug  = 1;                     // enables SMTP debug information (for testing)
                                           // 1 = errors and messages
                                           // 2 = messages only
$mail-&#062;SMTPAuth   = true;                  // enable SMTP authentication
$mail-&#062;SMTPSecure = &quot;ssl&quot;;                 // sets the prefix to the servier
$mail-&#062;Host       = &quot;XXXXXXX.XXXXXXX.org&quot;;      // sets GMAIL as the SMTP server
$mail-&#062;Port       = 465;                   // set the SMTP port for the GMAIL server
$mail-&#062;Username   = &quot;contact@XXXXXXX.com&quot;;  // GMAIL username
$mail-&#062;Password   = &quot;XXXXXXX&quot;;            // GMAIL password

$mail-&#062;SetFrom(&#039;contact@XXXXXXXX.com&#039;, &#039;HAL&#039;);

//$mail-&#062;AddReplyTo(&quot;user2@gmail.com&#039;, &#039;First Last&quot;);

$mail-&#062;Subject    = &quot;Halmira 469&quot;;

//THE PROBLEM IS HERE WHEN I WANT TO SEND THE DATA AS INLINE TEXT TO EMAIL FROM MYSQL IT IS NOT WORKING. ONLY &quot;PRINT THE DATA&quot; IS SENDING TO EMAIL.

$body                = &#039;Print the data&#039;;
mysql_connect(&quot;localhost&quot;,&quot;XXXXXXX&quot;,&quot;XXXXXXX&quot;);
@mysql_select_db(&quot;sandi565_form11&quot;);
$query[&quot;SELECT * FROM demo ORDER BY ID DESC LIMIT 1&quot;];
$result = mysql_query($query);

//while ($row = mysql_fetch_array ($result)) {
//  $mail-&#062;AltBody    = &quot;To view the message, please use an HTML compatible email viewer!&quot;; // optional, comment out and test
  $mail-&#062;MsgHTML($body);
  $address = &quot;XXXXXXX@gmail.com&quot;;
  $mail-&#062;AddAddress($address, &quot;user2&quot;);

//$mail-&#062;AddAttachment(&quot;images/phpmailer.gif&quot;);      // attachment
//$mail-&#062;AddAttachment(&quot;images/phpmailer_mini.gif&quot;); // attachment

if(!$mail-&#062;Send()) {
  echo &quot;Mailer Error: &quot; . $mail-&#062;ErrorInfo;
} else {
  echo &quot;Message sent!&quot;;
}

?&#062;
]]></description>
			<content:encoded><![CDATA[<p>After customer filling the form, the form data will be send to mysql, and an email will sent to me with the last form data that customer submitted. All is working, but only the problem is in the email &#8220;last mysql data&#8221; is not going as inline text. So, how to do this? I am doing in PHP. In am new in PHP. Please help me. </p>
<p>See full code &#8211; <a href="http://halmiratea.com/to-stackoverflow.com-not-personal1.php#problem" rel="nofollow ugc">http://halmiratea.com/to-stackoverflow.com-not-personal1.php#problem</a></p>
<p>&lt;?php</p>
<p>define(&#039;DB_NAME&#039;, &#039;sandi565_form11&#039;);<br />
define(&#039;DB_USER&#039;, &#039;XXXXXXX&#039;);<br />
define(&#039;DB_PASSWORD&#039;, &#039;XXXXXXX&#039;);<br />
define(&#039;DB_HOST&#039;, &#039;localhost&#039;);</p>
<p>$link = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);</p>
<p>if (!$link) {<br />
die(&#039;Could not connect: &#039; . mysql_error());<br />
}</p>
<p>$db_selected = mysql_select_db(DB_NAME, $link);</p>
<p>if (!$db_selected) {<br />
die(&#039;Can&#039;t use &#039; . DB_NAME . &#039;: &#039; . mysql_error());<br />
}</p>
<p>//Start Posting the data in Mysql database from Form Input</p>
<p>$value = $_POST[&#039;input1&#039;];<br />
$value2 = $_POST[&#039;MAmount&#039;];</p>
<p>$sql = &quot;INSERT INTO demo (input1, MAmount) VALUES (&#039;$value&#039;, &#039;$value2&#039;)&quot;;</p>
<p>if (!mysql_query($sql)) {<br />
die(&#039;Error: &#039; . mysql_error());</p>
<p>}</p>
<p>//start print the database</p>
<p>$data = mysql_query(&quot;SELECT * FROM demo ORDER BY ID DESC LIMIT 1&quot;)<br />
 or die(mysql_error());<br />
 Print &quot;&#8221;;<br />
 while($info = mysql_fetch_array( $data ))<br />
 {<br />
 Print &#8220;&#8221;;<br />
 Print &#8220;ID: &#8220;.$info[&#8216;ID&#8217;] . &#8221; &#8220;;<br />
 Print &#8220;Input1: &#8220;.$info[&#8216;input1&#8217;] . &#8221; &#8220;;<br />
 Print &#8220;MAmount: &#8220;.$info[&#8216;MAmount&#8217;] . &#8221; &#8220;;<br />
 }<br />
 Print &#8220;&#8221;; </p>
<p>mysql_close();</p>
<p>//end print the database on form processing page</p>
<p>//start emailing the data</p>
<p>date_default_timezone_set(&#8216;Asia/Kolkata&#8217;);</p>
<p>require_once(&#8216;class.phpmailer.php&#8217;);<br />
//include(&#8220;class.smtp.php&#8221;); // optional, gets called from within class.phpmailer.php if not already loaded</p>
<p>$mail             = new PHPMailer();</p>
<p>//$body             = &#8220;gdssdh&#8221;;<br />
//$body             = preg_replace(&#8220;[]&#8221;,&#8221;,$body);</p>
<p>$mail-&gt;IsSMTP(); // telling the class to use SMTP<br />
$mail-&gt;Host       = &#8220;ssl://XXXXXXX.XXXXXXX.org&#8221;; // SMTP server<br />
$mail-&gt;SMTPDebug  = 1;                     // enables SMTP debug information (for testing)<br />
                                           // 1 = errors and messages<br />
                                           // 2 = messages only<br />
$mail-&gt;SMTPAuth   = true;                  // enable SMTP authentication<br />
$mail-&gt;SMTPSecure = &#8220;ssl&#8221;;                 // sets the prefix to the servier<br />
$mail-&gt;Host       = &#8220;XXXXXXX.XXXXXXX.org&#8221;;      // sets GMAIL as the SMTP server<br />
$mail-&gt;Port       = 465;                   // set the SMTP port for the GMAIL server<br />
$mail-&gt;Username   = &#8220;&#99;on&#116;a&#99;&#116;&#64;&#88;&#88;&#88;&#88;&#88;XX&#46;c&#111;&#109;&#8221;;  // GMAIL username<br />
$mail-&gt;Password   = &#8220;XXXXXXX&#8221;;            // GMAIL password</p>
<p>$mail-&gt;SetFrom(&#8216;&#99;o&#110;&#116;a&#99;t&#64;X&#88;XXXXX&#88;&#46;com&#8217;, &#8216;HAL&#8217;);</p>
<p>//$mail-&gt;AddReplyTo(&#8220;u&#115;&#101;r2&#64;gma&#105;l&#46;c&#111;&#109;&#8217;, &#8216;First Last&#8221;);</p>
<p>$mail-&gt;Subject    = &#8220;Halmira 469&#8221;;</p>
<p>//THE PROBLEM IS HERE WHEN I WANT TO SEND THE DATA AS INLINE TEXT TO EMAIL FROM MYSQL IT IS NOT WORKING. ONLY &#8220;PRINT THE DATA&#8221; IS SENDING TO EMAIL.</p>
<p>$body                = &#8216;Print the data&#8217;;<br />
mysql_connect(&#8220;localhost&#8221;,&#8221;XXXXXXX&#8221;,&#8221;XXXXXXX&#8221;);<br />
@mysql_select_db(&#8220;sandi565_form11&#8221;);<br />
$query[&#8220;SELECT * FROM demo ORDER BY ID DESC LIMIT 1&#8221;];<br />
$result = mysql_query($query);</p>
<p>//while ($row = mysql_fetch_array ($result)) {<br />
//  $mail-&gt;AltBody    = &#8220;To view the message, please use an HTML compatible email viewer!&#8221;; // optional, comment out and test<br />
  $mail-&gt;MsgHTML($body);<br />
  $address = &#8220;X&#88;&#88;X&#88;&#88;&#88;&#64;g&#109;&#97;&#105;l&#46;c&#111;&#109;&#8221;;<br />
  $mail-&gt;AddAddress($address, &#8220;user2&#8221;);</p>
<p>//$mail-&gt;AddAttachment(&#8220;images/phpmailer.gif&#8221;);      // attachment<br />
//$mail-&gt;AddAttachment(&#8220;images/phpmailer_mini.gif&#8221;); // attachment</p>
<p>if(!$mail-&gt;Send()) {<br />
  echo &#8220;Mailer Error: &#8221; . $mail-&gt;ErrorInfo;<br />
} else {<br />
  echo &#8220;Message sent!&#8221;;<br />
}</p>
<p>?&gt;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ed D		</title>
		<link>https://www.krazyworks.com/count-users-with-last/comment-page-1/#comment-247649</link>

		<dc:creator><![CDATA[Ed D]]></dc:creator>
		<pubDate>Thu, 28 Mar 2013 21:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.comradegeneral.com/SysAdmin/?p=19#comment-247649</guid>

					<description><![CDATA[Here is my code. I need help figuring out how to get a total of credit hours  taken after the user is prompted to add more and to keep adding them together so in the end i can add them to the intital credit hours asked for in the very beginning. 

Please help. Thank you



#include 
#include 


using namespace std;

int main()

{
string classstanding, answer; 


int studentid, credits, points , addcredits, usernum,  totalcredits, grade ; 
float intgpa; 





cout &#060;&#062; answer; 

while ( answer == &quot;y&quot; )
{ 


cout &#060;&#062; studentid; 


cout &#060;&#062; credits; 


cout &#060;&#062; points; 

if(credits &#062;= 90)
{
classstanding = &quot;Senior&quot;;
}
else if (credits &#062;= 60)
{
classstanding = &quot;Junior&quot;;
}
else if (credits &#062;= 30)
{
classstanding = &quot;Sophmore&quot;;
}
else if (credits &#062;= 0) 
{
classstanding = &quot;Freshman&quot;; 
}
else
{
classstanding = &quot;Error&quot;;
}

intgpa = ( points / credits ) ;



cout &#060;&#062; answer ; 

while ( answer == &quot;y&quot; )
{ 

cout &#060;&#062; addcredits ; 

totalcredits = addcredits + credits; 














cout &#060;&#060; endl &#060;&#062; answer ; 

}


cout &#060;&#060; endl &#060;&#060;endl &#060;&#060; endl &#060;&#060; &#034;Student:  &#034; &#060;&#060; studentid &#060;&#060; endl;

cout &#060;&#060; &#034;nGrade Level: &#034;&#060;&#060; classstanding &#060;&#060; &#034;tCredits :  &#034;&#060;&#060; credits &#060;&#060; &#034;tPoints :  &#034; &#060;&#060; points &#060;&#060; &#034;tGPA   : &#034; &#060;&#060; intgpa 
&#060;&#060; endl &#060;&#060; totalcredits ; 

cout &#060;&#060; endl &#060;&#060; &#034;*************************************************************&#034;  &#060;&#060; endl ; 



cout &#060;&#062; answer; 


}


}
]]></description>
			<content:encoded><![CDATA[<p>Here is my code. I need help figuring out how to get a total of credit hours  taken after the user is prompted to add more and to keep adding them together so in the end i can add them to the intital credit hours asked for in the very beginning. </p>
<p>Please help. Thank you</p>
<p>#include<br />
#include </p>
<p>using namespace std;</p>
<p>int main()</p>
<p>{<br />
string classstanding, answer; </p>
<p>int studentid, credits, points , addcredits, usernum,  totalcredits, grade ;<br />
float intgpa; </p>
<p>cout &lt;&gt; answer; </p>
<p>while ( answer == &#8220;y&#8221; )<br />
{ </p>
<p>cout &lt;&gt; studentid; </p>
<p>cout &lt;&gt; credits; </p>
<p>cout &lt;&gt; points; </p>
<p>if(credits &gt;= 90)<br />
{<br />
classstanding = &#8220;Senior&#8221;;<br />
}<br />
else if (credits &gt;= 60)<br />
{<br />
classstanding = &#8220;Junior&#8221;;<br />
}<br />
else if (credits &gt;= 30)<br />
{<br />
classstanding = &#8220;Sophmore&#8221;;<br />
}<br />
else if (credits &gt;= 0)<br />
{<br />
classstanding = &#8220;Freshman&#8221;;<br />
}<br />
else<br />
{<br />
classstanding = &#8220;Error&#8221;;<br />
}</p>
<p>intgpa = ( points / credits ) ;</p>
<p>cout &lt;&gt; answer ; </p>
<p>while ( answer == &#8220;y&#8221; )<br />
{ </p>
<p>cout &lt;&gt; addcredits ; </p>
<p>totalcredits = addcredits + credits; </p>
<p>cout &lt;&lt; endl &lt;&gt; answer ; </p>
<p>}</p>
<p>cout &lt;&lt; endl &lt;&lt;endl &lt;&lt; endl &lt;&lt; &quot;Student:  &quot; &lt;&lt; studentid &lt;&lt; endl;</p>
<p>cout &lt;&lt; &quot;nGrade Level: &quot;&lt;&lt; classstanding &lt;&lt; &quot;tCredits :  &quot;&lt;&lt; credits &lt;&lt; &quot;tPoints :  &quot; &lt;&lt; points &lt;&lt; &quot;tGPA   : &quot; &lt;&lt; intgpa<br />
&lt;&lt; endl &lt;&lt; totalcredits ; </p>
<p>cout &lt;&lt; endl &lt;&lt; &quot;*************************************************************&quot;  &lt;&lt; endl ; </p>
<p>cout &lt;&gt; answer; </p>
<p>}</p>
<p>}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sonny		</title>
		<link>https://www.krazyworks.com/count-users-with-last/comment-page-1/#comment-246980</link>

		<dc:creator><![CDATA[Sonny]]></dc:creator>
		<pubDate>Sun, 24 Mar 2013 06:33:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.comradegeneral.com/SysAdmin/?p=19#comment-246980</guid>

					<description><![CDATA[Hi there,
I&#039;m learning C++ from Cay Horstmann&#039;s &quot;Big C++&quot;, and I stumbled upon the following code: 


#include 
#include 

using namespace std;

int main()
{
    cout &#060;&#062; first;
    cin &#062;&#062; middle;
    cin &#062;&#062; last;
    string initials = first.substr(0,1) + middle.substr(0,1) + last.substr(0,1);
    cout &#060;&#060; &#034;Your initials are &#034; &#060;&#060; initials &#060;&#060; &#034;n&#034;;

    return 0;
}

If I begin middle name with one or more white-spaces, the output does not change. Is this because the .substr begins count only with the first non-whitespace character? For example, if we have the name John David Smith, and I enter,
John
       David
Smith

the output is JDS regardless of whether I type David with or without space before it. This puzzles me. I know that space characters count between two or more words in a string (Hello, World!n consists of 14 characters total, since the space between the comma and the W is counted). But if I enter a string that begins with a white-space, and I ask .substr to begin count from character 0, does it disregard the space and jump to the first letter?
Any clarification would be greatly appreciated. Thank you!
]]></description>
			<content:encoded><![CDATA[<p>Hi there,<br />
I&#8217;m learning C++ from Cay Horstmann&#8217;s &#8220;Big C++&#8221;, and I stumbled upon the following code: </p>
<p>#include<br />
#include </p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
    cout &lt;&gt; first;<br />
    cin &gt;&gt; middle;<br />
    cin &gt;&gt; last;<br />
    string initials = first.substr(0,1) + middle.substr(0,1) + last.substr(0,1);<br />
    cout &lt;&lt; &quot;Your initials are &quot; &lt;&lt; initials &lt;&lt; &quot;n&quot;;</p>
<p>    return 0;<br />
}</p>
<p>If I begin middle name with one or more white-spaces, the output does not change. Is this because the .substr begins count only with the first non-whitespace character? For example, if we have the name John David Smith, and I enter,<br />
John<br />
       David<br />
Smith</p>
<p>the output is JDS regardless of whether I type David with or without space before it. This puzzles me. I know that space characters count between two or more words in a string (Hello, World!n consists of 14 characters total, since the space between the comma and the W is counted). But if I enter a string that begins with a white-space, and I ask .substr to begin count from character 0, does it disregard the space and jump to the first letter?<br />
Any clarification would be greatly appreciated. Thank you!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
