267 Posted Topics
Re: It's a very easy - sum of column "c3" (all rows of table "t1") SELECT SUM(`c3`) FROM `t1`; each row sum of columns "c3", "c4", "c5" SELECT *,(`c3`+`c4`+`c5`) AS `sum` FROM `t1`; and total sum of columns "c3", "c4", "c5" all rows of table "t1" SELECT *,(`c3`+`c4`+`c5`) AS `sum`,SUM(`c3`+`c4`+`c5`) AS … | |
Re: Recursive set owner www-data for all www directories: sudo chown -R 33 /var/www Recursive set user group to YOU for all www directories: sudo chgrp -R 1000 /var/www Recursive set properties for owner and group - execute directories and read-write files, but other users read files and execute directories (lower … | |
Re: You selected variables from t2 and t3 by the where clause, but thear miss WHERE clause to table t1 | |
Re: Select count of male: SELECT COUNT(*) FROM mydatatable WHERE gender = 'male' and select count of female: SELECT COUNT(*) FROM mydatatable WHERE gender = 'female' | |
Re: This code check for SPACE in value: document.form1.NEGERI.value==' ' but this check for empty value: document.form1.NEGERI.value=='' ![]() | |
Re: I think you need 3 tables instead of 3 columns e.g. Fruits, Countries, Sizes | |
Re: Attribute name="submit" always for submit button. And check your HTML syntax - where starts <table> ? | |
Re: Alt+F4 works in all Windows OS and other OS like Linux (maybe all OS). | |
Re: Show your script please | |
Re: session_start(); if ( isset($_POST['name']) ){ $_SESSION['first_name'] = $_POST['name']; } $first name = ( isset($_SESSION['first_name']) ? $_SESSION['first_name'] : ""); echo $first name; | |
Re: Third example - wrong SQL query: `&&` replace to `AND` ![]() | |
Re: http://www.roguewave.com/Portals/0/products/imsl-numerical-libraries/java-library/docs/5.0.1/chartpg/xml_xslt.html | |
Re: It working perfectly for me with *DEV C++ 5.6.3 General: TDM-GCC 4.8.1 64-bit Release Executing g++.exe...* | |
Re: if(!ctype_digit($var)){ echo "NOT DIGIT"; } | |
Re: Your postcode datatype is string but you check integer $i in array of string in line 36. You put array as label of checkbox in lines 38 and 42 label. I recommend replace lines 34-44 with this: for( $i=0; $i <$max; $i++ ) { $checked = ( ( /* put … | |
Re: preg_match('~^(\d{3}\-){2}\d{4}$~', '000-000-0000') and don't need check strlen | |
Re: Maybe something like this: $('#anchor, #anchor2, #anchor3') .click(function(){ ... }) .dblclick(function(){ ... }) .hover(function(){ ... }); | |
Re: When connected to the database immediatly set charset e.g. $link = mysql_connect('localhost', 'root', ''); $db_selected = mysql_select_db("dbname", $link); mysql_set_charset('utf8',$link); or OOP version $mysqli = new mysqli('localhost', 'root', '', 'dbname', 3306); $mysqli->set_charset('utf8'); | |
Re: Would not it be more convenient to use a trigger? | |
Re: JOIN tables, if the second table supplements the entries from the first table or UNION tables if the tables have the same structure | |
Re: for($i=1; $i<=12; $i++){ echo str_pad($i, 2, "0", STR_PAD_LEFT)."<br/>"; } | |
Re: Line 25 replace `elseif` to `if`, lines 13, 16, 19, 22 need quotes like this: `if ($place == 'balkon')` | |
Re: I recommend to insert spaces: <?php if($True == 0){ ?> <a href="/#"> Apply </a> <?php } else { ?> <a href="/#"> Aleary applied </a> <?php } ?> | |
Re: `var a = str.replace(/error/,'my replace')` or `str.replace(/anything.*anything/,'anything my replace anything')` if I understand correctly ![]() | |
Re: Put after line 17: if(!$requestCompParse){ $e = oci_error($conn); echo "Parse error: ".$e['message']; } replace line 19 to: $ex = oci_execute($requestCompParse); and put after line 19: if(!$ex){ $e = oci_error($requestCompParse); echo "Execute error: ".$e['message']; } | |
Re: <?php $id = 3; // e.g. value of checked for($i=1; $i<=5; $i++){ $checked = ($id==$i?" checked=\"checked\"":""); ?> <input type="radio" class="css-checkbox" id="1radio<?=($id);?>"<?=$checked;?> name="<?=($id);?>" value="<?=$i;?>"> <label for="1radio<?=($id);?>" class="css-label"><?=$i;?></label> <?php } ?> What is the value of your "$count" sequential or not? | |
Re: Cut line 2: `$place = mysql_real_escape_string($_POST['place']);` and write after check `isset()` (line 4): `if(isset($_POST['place']))` | |
Re: `swap()` is C++ built-in function | |
Re: Link to css file put in XSLT file, like: <?php header("Content-type:text/xml;charset=utf-8"); print "<?xml version=\"1.0\" encoding=\"utf-8\"?> <?xml-stylesheet type=\"text/xsl\" href=\"transform.xsl\" ?>"; echo '<markers>'; while ($row = @mysql_fetch_assoc($result)){ echo '<marker '; echo 'name ="' . parseToXML($row['name']) . '" '; echo 'address ="' . parseToXML($row['address']) . '" '; echo 'lat ="' . $row['lat'] . … | |
Re: Write PHP header and XML header in line 65 `header("Content-type:text/html;charset=utf-8");` `print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";` | |
Re: #include <iostream> using namespace std; bool IsPrime(int number) { for (int i=2; i<=number/2; i++) { if (number % i == 0) return false; } return true; } int main() { for(int i=2; i<=100; i++) { cout << i << (IsPrime(i)?" is prime":"") << "\n"; } system ("PAUSE"); return 0; } | |
Re: It should be ok if SID is auto_increment or is default value for SID, but ERROR if not | |
Re: You can use crontab http://www.adminschoice.com/crontab-quick-reference/ | |
Re: C++ bult-in function #include <iostream> using namespace std; int main() { int a,b; cin >> a; cin >> b; cout<< "Numbers are " << a <<" "<< b <<endl; swap(a,b); cout << "Swaped numbers are " << a <<" "<< b << endl; } | |
Re: use `td:last-child` in css | |
Re: exact match $sql = "SELECT * FROM mytablename WHERE `fullnames` = '$searchname'"; or search by name parts $sql = "SELECT * FROM mytablename WHERE `fullnames` LIKE '%$searchname%'"; | |
Re: No input tag types "ip" and "email". Please check http://www.w3schools.com/tags/tag_input.asp | |
Re: You can use trigger in database. If you have not previously used read this: http://dev.mysql.com/doc/refman/5.6/en/trigger-syntax.html | |
Re: In your example, there is no difference "++" pattern before or after the "number1", but if you change your code to: #include <iostream> int main() { int number1 = 0; int number2 = 0; while(number1 < 5) { number2 += number1++; } std::cout << "number1 = " << number1 << … | |
Re: Any case like this: case 1: cout <<"-- Area Menu --"<<'\n'; cout <<"1. Retangle"<<'\n'; cout <<"2. Circle"<<'\n'; cout <<"3. Right Triangle"<<'\n'; cout <<"Enter Menu Number Choice: "; cin >> areamenuitem; break; need write in one line like: case 1: cout <<"-- Area Menu --\n1. Retangle\n2. Circle\n3. Right Triangle\nEnter Menu Number … | |
Re: http://www.daniweb.com/posts/jump/1971255 | |
Re: Pēc vārda atļaušos secināt, ka esi latvietis - nu tad esi sveicināts! | |
Re: Pointers need to delete at the end #include <iostream> using namespace std; struct Vagon{ int num; Vagon *next; Vagon(int vNum){ num=vNum; next=NULL; }; ~Vagon(){}; }; class Voz{ private: Vagon *first; Vagon *last; public: void addVagon(int num){ Vagon *konduktor=new Vagon(num); if(first==NULL){ first=konduktor; } else { last->next=konduktor; } last=konduktor; } void printList(void){ … | |
Re: Maybe this useful `SELECT LPAD(CAST(myValue AS DECIMAL(4,2)), 5, '0');` The result will be: `11.5, 5.5, 2.25, 1, 12.25` AS `11.50 05.50 02.25 01.00 12.25` | |
Re: const int SIZE = 4; int counter = 0; while(counter<SIZE) { // do something ... if(SIZE == counter+1) { cout << "Hello world"; } counter++; } | |
Re: #include <iostream> #include <iomanip> int main() { srand(time(NULL)); const int a=5; const int b=5; int arr[a][b]; for(int i=0; i<a; i++){ for(int j=0; j<b; j++){ arr[i][j] = rand()%9+1; std::cout << std::setw(4) << arr[i][j]; } std::cout << "\n"; } std::cout << "\n"; std::cout << "corner: " << arr[0][0] << " " << … |
The End.