1,576 Posted Topics
![]() | Re: I think this will work (not tested). The important part is the inner select that returns all customer who DO have a record made against today's date and then you want to select the customers that are not in that list. SELECT c.*, i.* FROM customer c JOIN income i … |
Re: These don't match: ` <input type="text" id="Username" placeholder="Username">` `user = document.getElementById("User").value;` The <Us> element has an ID of User so you're selecting the wrong element. | |
Re: Your signatures for the userExit method don't match. You're calling it with no parameters but the method signature expects a variable called empCode. | |
Re: This is a bit confusing, you seem to be jumping from referring to MySql databases to SQL Server databases. What db type are you trying to connect to, what is the exact error you are getting now and is it for all connections or when you are trying to a … | |
Re: Is the actual error "Error establishing a database connection"? And has the support guy been able to give you any further information from the server logs? | |
Re: It shouldn't be much different from what that article contained, the idea is fairly well explained. Is there something in particular that is causing you trouble? ![]() | |
Re: You'll have to double check each x item in your list. One of them doesn't have a value for the name property. The null pointer exception really only means one thing: the value it refers to is null. Step through the loop in the debugger, wait for it to error … | |
Re: The PHP manual has this to say about the mysql_select_db method's second parameter (called the link identifier): Link Identifer: The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as … | |
Re: I'm not familar with tha particular tool but I've found the device mode option available in Chrome Inspector is pretty good and I've never had issues with a page not matching between the device and the inspector. Having said that, nothing beats testing it on the actual device. | |
Re: That error would generally happen because the select statement has returned an empty set, which is why the row count is zero. Double check your sql statement is working as expected by running it directly against the database. | |
Re: Any errors showing in the console? | |
Re: Given the easy nature of the string you can split on the '%' character and end up with an array of the text you are after. The hard part is if the inputs aren't in the same order as the string or any kind of dynamic sorting is required. That's … | |
Re: Where in the page is the script running? If it is before the element then your script is looking for an element that doesn't exist exist yet. If you were using jQuery you'd wrap it in the document ready method. In plain javascript you'd call the function in the onLoad … | |
Re: If the sql files is a list of INSERT, SELECTS, etc, read the file via a stream reader and execute each line as a standard query i.e. the text in each line becomes the string that makes up the command text. Alternatively, you can execute a command line process with … | |
Re: Could you define 'not working' and which IE version? I just copied your code and it worked in both Chrome and IE 11. ![]() | |
Re: You haven't mentioned what language you intend to be using for this but the answer is yes, it's possible. Depending on what functions you have available in your chosen language you need to determine the location of the last \ and then create a substring from position 0 to the … | |
Re: I think the amount of data and how you need to interact with it should be the deciding factor. The avantage of databases is that selecting the information is easy, depending how complex your data is this may not be the case for an array. The answer to your second … | |
Re: You could start by telling us what you intend to build it in (lanuage, platform, etc) and what bits you actually need help with (please don't say all of it). It's even better if you reach an actual specific problem that you can't solve and post a question about that. … | |
Re: Does the error message provide useful information? If you have another way of accessing the database, control panel or ssh, etc, you can test out connecting via those means. But the basics you have there look right from a code perspective so the problem might lie in the username/password or … | |
Re: In the code you've posted the sub method whoWins never gets called. Call that method after both hands have picked and it should work | |
Re: you might want to look at using a service like MailChimp. They have plenty of tools for auto responding emails, coupons, etc. There are quite a few options out there but I've used MailChimp a bit and it's a very good system (I'm not affiliated with them in any way). | |
Re: Is the PHP process started via AJAX? If it is, you can display a spinner gif when the AJAX call is first made (using jQuery or similar) and switch it off when the reponse comes back. If the page starts the script and then redirects you can just have a … | |
Re: Is this project involving databases or do you simply need two Acccount instances created that communicate? If the later you need to create your Account class with methods (getter and setters) that alter the current amount (which will be a class variable). Create the two classes, initialise each with a … | |
Re: Move your code into the click or change event of the checkbox. You'll want to refer to the parent of the checkbox to make sure you are targeting the correct td. $("td input['type=checkbox']").change(function() { if($(this).prop('checked')) { $(this).parent().css('background-color', '#somecolour'); } }); that should work, I haven't tested it myself but at … | |
Re: You could either do another AJAX query to return all of the conversations and use the result to update the comment area (could be slow depending on the amount of data) or you could use javascript to inject the new comment into the page, at the correct location, after the … ![]() | |
Re: Use jQuery's addClass to apply a new CSS style. | |
Re: I'm assuming the user's have their roles stored in the database and you extract them out when the user logs in successfully. Once you have that stored in the session (or wherever you keep it). Then you have options. If the edit profile pages are quite different you can create … | |
Re: In your constructor you're setting $this->db to be equal to $DB_con, and using $this->db in your login method. So two questions: is $DN_con a valid connection when you pass it through to the class? And does the login method work? if the login method works use $this->db and tour problem … | |
Re: You only set the sql statement once but at line 17 you're using it as part of an IF statement: `If sql = "SELECT Usertype FROM [db_dole].[dbo].[tbl_user] WHERE Usertype = 'Admin'" Then` Which will never be true so that's part of the problem. Otherwise you're on the right track. You … | |
Re: I think he was refering to an app that is nothing more than an in-app browser (a web view) that points to your website. Meaning the app wouldn't work without an internet connection (probably not an issue). | |
Re: Cordova/Phonegap. I've built a couple of apps this year using Cordova and maintained a couple of others. It's a pretty easy learning curve, heaps of plugins and dev tools to help you - I do my cordova programming in visual studio 2015. The down side of cross platform, if you're … | |
Re: If you want it to be cross-platform on mobile you can look at using Cordova (Phonegap) or Xamarin. Both can be used via Visual Studio once you've installed some extras and you'll be able to build using your javascript knowledge. Any server side components can still be down in PHP … | |
Re: `echo "<select name='name' id='name' <?php if ($stat =='a'){ echo ('disabled');} ?> >";` I haven't actually tested that but the main point is you need the <?php ?> tags otherwise you're just going to echo out the if statement as text. | |
Re: You can do one search but you'll need to add in WHERE clauses, one for each word in the search string. E.g. `SELECT * FROM [SearchTable] WHERE [key_Word] LIKE '%get%' OR [key_Word] LIKE '%red%' OR [key_Word] LIKE '%cat%';` That can get reasonably big when searching for a lot of words … | |
Re: Travel overseas while you are young. I spent 3 years tripping around the place and while your career is on hold during that time the results in terms of maturity and experience and well worth it. If you're money or career focuseed then don't, you'll just regret it later. Get … ![]() | |
Re: In the source I can see that the flickty-slider has this CSS transform specified: `transform: translate(791px);` Turning that off pulled the slider over to the correct position. And I only just saw this has already been answered. Excuse me. | |
Re: You can load up what is called a CSS reset file first, this is just a standard CSS file but it resets a lot of display properties to default. You then apply your site's CSS and you should achieve a level of consistency across browsers. You don't have to write … | |
Re: No errors in your console log? Or is c never greater than d (the onblur is firing but your output never happens)? | |
Re: You need to give us more information. What exactly are you stuck on? What is going wrong? | |
Re: If your code example here is the same as your actual code you have several problems. Line 17: `echo "<table>";` Line 18: `echo "<tr><th>Airport</th><th>City</th><th>Code</th></tr>";` Line 21: your inner arrays only have 3 items so you don't need to loop to 10 `for ($col = 0; $col < 10; $col++) {` … | |
Re: Do you mean you want to hide the actual numbers themselves? CSS: `.bx-default-page {display: none;}` If you're after something else I think you'll need to be more specific... | |
Re: I'd suggest learning coding first if you need to pick one. Give yourself an understanding of how to code and do some small projects, etc. Then when you come to learn algorithms you'll be able to see how your code could be improved. Your previous mistakes and in-efficient code will … | |
Re: The only problem I had with this code is that you ask for a seven digit number to be input but your check in GetInput looks for whether the input string is of length 8, not 7. Enter an 8 digit number and everything works just fine. | |
Re: The key is in the line "none of the labels are on the right box". When you pull one fruit out of each box you're going to get 2 apples and 1 pear or 2 pears and 1 apple. For example, if you reach into the box labeled apples and … | |
Re: Firstly, to remove the obvious, if you were to run that query directly against the database how many results should you get? | |
Re: You can loop through the numberList examining each number and its count. Take the first number as being the highest and store it in another variable e.g. int highestCount. For each number in the list, compare it's count to highestCount. If it is higher, replace highestCount with the new count … | |
Re: Most systems would create the menu by checking which elements should show. Typically that would entail checking if the user was logged in or not and displaing the log in/register stuff if the they weren't. So, you wouldn't need to create a whole new menu, you just use the checks … ![]() | |
Re: You can store the current login attempts in a session variable and then check that variable on each attempt, incrementing by one for each failure. When it hits 3, you can echo out the submit button with the 'disabled' attribute <?php if($_SESSION['failedLogins'] == 3) { echo "<td><button type="submit" name="btn-login" disabled>Sign … | |
Re: You don't want to be using submark[$j] as that just repeats the first values (0 through to whatever size j is). You want to have another counter that starts at zero and increments at the end of each inner loop. Or structure your marks array to be two dimensional and … |
The End.