Posts
 
Reputation
Joined
Last Seen
Ranked #191
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
98% Quality Score
Upvotes Received
157
Posts with Upvotes
138
Upvoting Members
61
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
43 Commented Posts
9 Endorsements
Ranked #207
Ranked #220
~215.43K People Reached
Favorite Tags
Member Avatar for ianhaneybs

You got a `GROUP_CONCAT()` in the SELECT statement so the query will group everything as one, since no GROUP BY was specified. You don't want GROUP_CONCAT anything in tblorders if you want to view all the orders for that Customer. Add to the bottom after the WHERE clause: `GROUP BY …

Member Avatar for gottaloveit
0
71
Member Avatar for SolidSolutions

Wheres the function! function checkLastChar(string){ return string.charAt(string.length-1); } console.log(checkLastChar('testing')); function removeTrailingDot(string){ if(string.charAt(string.length-1) == '.'){ return string.slice(0, -1); }else{ return string; } } console.log(removeTrailingDot('something.')); console.log(removeTrailingDot('something')); If you find yourself repeating the same code your doing it wrong. Probably not an absolute truth but it is a pretty workable rule.

Member Avatar for Biiim
0
5K
Member Avatar for david.tigner

In your code where you write `mail($to,$subject,$message,$headers);` if you want to get error messages or "do something if it fails" you need to alter it a bit to something like: if(mail($to,$subject,$message,$headers)){ //if successful do something }else{ //if error do something else } //or var_dump(mail($to,$subject,$message,$headers)); //or $tmp = mail($to,$subject,$message,$headers); var_dump($tmp); I …

Member Avatar for Dani
0
372
Member Avatar for nander

logically, it would be because `WHERE variable_name = :variable_name` matches 1 row in your table maybe try a `var_dump(str_replace(':variable_name',"'some_value'",$sql));var_dump($records);`? run the sql on whichever way you use to access your DB directly I don't use PDO so i'm not too familiar on how it returns results, either way you will …

Member Avatar for Chris_103
0
120
Member Avatar for Dani

I realise this has been marked as solved, but I wanted to make it known that the HAVING clause runs on the returned result set of your query, which as you say has no indexes on it as it is just a temporarily created result set - but has the …

Member Avatar for toneewa
0
718
Member Avatar for jayashree10

1. Your Hosting server (CPU, RAM, HDD) 2. Your Hosting server's internet bandwidth 3. Your Client computer(CPU, RAM, GPU, HDD) 4. Your Client computer's internet bandwidth Check the size of the files in your browsers developer tools - Network - should tell you how long it takes to download and …

Member Avatar for Biiim
0
78
Member Avatar for jayashree10

if you use javascript, or any programming language, you can cut out a lot of processor time by being smart in the program logic. eg. if you do a loop, work out data you can before the loop eg. $.each(myArray, function(item){ var now = moment(myDate); //do something with now }) …

Member Avatar for Biiim
0
64
Member Avatar for FarrisFahad

You can use an anchor tag still just use href="javascript:" so it doesn't do anything on click. <a href="javascript:" onclick="loadMore(this, '.Memes', 'ex/more.memes.php');">Load More Content</a> It will get some default styles added to it, so you might want to add style="text-decoration:none;" and overwrite the other defaults for an anchor tag. I …

Member Avatar for Dani
1
147
Member Avatar for tarun Nagar

Only ever heard of POST and GET. The others either have no use or is very specialised. a GET request puts the variables in the URL link - so the data is very visible. a POST request puts the data hidden in the headers of the request You use GET …

Member Avatar for Gulshan_6
0
137
Member Avatar for borobhaisab

How does this work for you? foreach($test as $v){ if (strpos($v, '_point') !== false) { echo $v; } } I didn't test it

Member Avatar for Dani
1
114
Member Avatar for borobhaisab

I use bcrypt passwords which look exactly like that. The first part of the string says how complex the hashing is, then followed by the salt then the hash. It generates completely different each time so you have to evaluate it with the verify function each time. Its designed to …

Member Avatar for Biiim
0
285
Member Avatar for riccardo.farabi

> I have this number 1726.16723958045672098127. How Can I register in my db MySql. Why is the number truncated? should be a column type decimal, DECIMAL(24,20) would store the number you just mentioned without truncating. 24 - how many digits in the number 20 - how many digits are after …

Member Avatar for riccardo.farabi
0
165
Member Avatar for larry29936

This should be what you are looking for: <div style='overflow-x:hidden;max-width:800px;'></div> Use bootstrap if it's not too complicated for you to get it set up. Bootstrap is very good [Bootstrap 5 Columns](https://getbootstrap.com/docs/5.0/layout/columns/) Bootstrap makes it responsive and is fully mobile compatible, so they stretch to fit the screen size and you …

Member Avatar for mtyide
1
457
Member Avatar for Intan Farizatul

I just use curly brackets around the variables, and you don't need \` marks in the array reference later on. You also want to screen the GET input to make sure someone isn't going to drop your database. I also try not to use key words for table names, like …

Member Avatar for Biiim
0
267
Member Avatar for Mr.M

a bit messy but you could use a subquery to filter it out, something like: SELECT user_id, message_time, status, message, `etc` FROM `table` t LEFT JOIN (SELECT user_id, MAX(message_time) last_message FROM `table` GROUP BY user_id) `sub_table` st ON t.user_id = st.user_id AND t.message_time = st.last_message WHERE st.user_id IS NOT NULL …

Member Avatar for Biiim
0
135
Member Avatar for KirovEli

If I was doing it I would use Google Analytics but if you really need to do it manually for your project you basically have to set up a database with a programming language - like PHP - that writes into the database when a user does a specific action …

Member Avatar for Arun_47
2
278
Member Avatar for emsanator

Missing a `</div>` at the end Document.getElementById("item_variation_size").innerHTML += '<div class="custom-control custom-control-inline custom-control-size mb-2"><input type="radio" class="custom-control-input" name="sizeRadio" id="sizeRadio_' + itemData.item.v.variationData.sizes + '" value="' + itemData.item.v.variationData.sizes[i] + '" data-toggle="form-caption" data-target="#sizeCaption"><label class="custom-control-label" for="sizeRadio_' + itemData.item.v.variationData.sizes[i] + '">' + itemData.item.v.variationData.sizes[i] + "</label>";

Member Avatar for Biiim
0
109
Member Avatar for timlab55

PHP is a server side script. It is a module attached to a web server, it takes the code and "Pre-processes" it and outputs the result hence PHP (Pre- Hypertext Processing or Hypertext pre-processor). The code executes linear, from top to bottom. The script dies if it hits a fatal …

Member Avatar for Biiim
0
98
Member Avatar for Vaske_1

This is a bit of a bootstrap question really, I hashed together a quick idea of what you could do. Keep in mind the concept behind bootstrap is RESPONSIVE - so you don't want to start defining exact sizes for the images etc as it scales with mobile devices and …

Member Avatar for ishu_1
0
198
Member Avatar for rabbit07

also could be `mysqli_fetch_assoc` instead of `mysqli_fetch_array`. `mysql_fetch_array` may not return the associative column names as the key values

Member Avatar for Biiim
0
434
Member Avatar for Battlecode10

function newgame() { writeOutput("I'm thinking of a number between 1 and 100..."); var answer = Math.floor(Math.random() * 100 + 1); var guessCount = 0; // TODO: use the randomNumber function to pick an answer for this game. } You need to remove the "var", this makes the variables local inside …

Member Avatar for Biiim
0
128
Member Avatar for cosmo13

My guess on it saying "Your Password is Incorrect!" is that when you refresh a page that has been "post"ed to it will ask if you want to confirm resubmitting the form data, if you say yes it will send the post data again. Otherwise based on your code it …

Member Avatar for Biiim
0
176
Member Avatar for Pocokos

The way I would do that is to have an array that stores the ID's of played songs then shuffle through finding the songs that have not played yet. I added the concept in jQuery as that is what I used to do it in my projects. var played_songs = …

Member Avatar for Biiim
0
162
Member Avatar for darkbox

Check out momentJS, I use [momentJS](https://momentjs.com/) for anything date & time related. You include the JS file in a script tag `<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment-with-locales.min.js">` you generally put this inside the `<head>` tag Then put the actual script AFTER the html divs where you want to do the conditional, as the …

Member Avatar for Biiim
2
372
Member Avatar for Eugene_15

Not familiar with Siema, I did get the bug you have on your codepen though. When I commented out the first gallery-image on the first slider it started working for me. I also fixed the canonicalised PHP code in the javascript `&lt;?php` and `?&gt;` whatever it is for, I just …

Member Avatar for Dani
0
244
Member Avatar for Sananil

I would put some var_dump's in to help debug. My guess is the variable type is not what you expect on something. <?php var_dump($Row); if ($Row->logged_in == '0') { var_dump('condition 3 fired'); if ($Row->last_login != '0000-00-00 00:00:00') { var_dump('condition 1 fired'); ?>Last Login : <?php echo date('d M Y ,H:i …

Member Avatar for Emmason
0
433
Member Avatar for Sananil

What I do is this: (you probably want the part inside `success: function(msg){` $.ajax({ type: "POST", data: {data:data}, url: connectProtocol+"://"+currentHost+"/analytics/ajaxProfileData.php", success: function(msg){ var responseData = $.parseJSON(msg); if(responseData['status'] == 'success'){ $('#div_dashboardContactsHomeProfileName').html(responseData['data']['first_name']+' '+responseData['data']['last_name']); if(responseData['data']['profImage'] == 'null'){ $('#div_dashboardContactsHomeProfileImg').attr('src',connectProtocol+"://"+currentHost+'/includes/images/profile_images/default.png'); }else{ $('#div_someidtoProfileImg').attr('src',connectProtocol+"://"+currentHost+'/fileUploads/images/'+responseData['data']['profImage']); } }else{ } } }); Then the PHP page has something like this: …

Member Avatar for Biiim
0
4K
Member Avatar for texelbee

$resultSet = $mysqli->query("SELECT `AIRCRAFTREGISTRATION`,`USEABLESEATS` FROM ACTIVE"); <?php while($rows = $resultSet->fetch_assoc()) { $acreg = $rows['AIRCRAFTREGISTRATION']; echo "<option value='$acreg'>$acreg - Seats:{$rows['USEABLESEATS']}</option>"; } ?> Looks like what you are asking. Is AIRCRAFTREGISTRATION the unique key for that table? You usually refer to unique ID refs in a drop down and use that programmatically. …

Member Avatar for Biiim
0
307
Member Avatar for larryson

Where it says `Firstname < 6` needs to be `Firstname.length < 6` Same goes for Lastname and Username. Those variables are strings so will error trying to evaluate them to a number

Member Avatar for pandglobal
0
285
Member Avatar for jonsan32

You mean like popovers? [Bootstrap Popover](https://www.w3schools.com/bootstrap/bootstrap_popover.asp) Then you could play around doing something extra onclick with `visibility:hidden` or `display:none` or even modifying the html content on click `$(this).html('');`

Member Avatar for jonsan32
0
809