1,576 Posted Topics

Member Avatar for සශික

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 …

Member Avatar for hericles
0
305
Member Avatar for Richmond_1

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.

Member Avatar for Richmond_1
0
206
Member Avatar for Parth_3

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.

Member Avatar for Santanu.Das
0
302
Member Avatar for toxicandy

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 …

Member Avatar for toxicandy
0
410
Member Avatar for Otir

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?

Member Avatar for Otir
0
328
Member Avatar for Rudi_2

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?

Member Avatar for diafol
0
245
Member Avatar for iamchamith

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 …

Member Avatar for hericles
0
148
Member Avatar for João_7

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 …

Member Avatar for rubberman
0
341
Member Avatar for Devon_2

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.

Member Avatar for gentlemedia
0
140
Member Avatar for nur faeza

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.

Member Avatar for ZER09
0
311
Member Avatar for Bensirpent07
Member Avatar for AndreRet

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 …

Member Avatar for AndreRet
0
283
Member Avatar for Siberian

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 …

Member Avatar for Siberian
0
158
Member Avatar for basit_3

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 …

Member Avatar for basit_3
0
602
Member Avatar for lloydsbackyard

Could you define 'not working' and which IE version? I just copied your code and it worked in both Chrome and IE 11.

Member Avatar for diafol
0
282
Member Avatar for JustARandomguy

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 …

Member Avatar for JustARandomguy
0
197
Member Avatar for Centorpe

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 …

Member Avatar for hericles
0
193
Member Avatar for benard16
Re: help

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. …

Member Avatar for hericles
0
142
Member Avatar for jeffersonalomia

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 …

Member Avatar for OtepTheThird
0
213
Member Avatar for Dexter1978

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

Member Avatar for Dexter1978
0
212
Member Avatar for cassyjack

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).

Member Avatar for daniel.main.902
0
350
Member Avatar for James_43

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 …

Member Avatar for James_43
0
11K
Member Avatar for jerome2467

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 …

Member Avatar for Sudarvizhi_1
0
6K
Member Avatar for wooshman

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 …

Member Avatar for wooshman
0
5K
Member Avatar for gogs85

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 …

Member Avatar for diafol
0
441
Member Avatar for davy_yg
Member Avatar for shany0786

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 …

Member Avatar for shany0786
0
287
Member Avatar for Kevin_22

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 …

Member Avatar for Kevin_22
0
429
Member Avatar for Miurei

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 …

Member Avatar for Miurei
1
7K
Member Avatar for SimonIoa

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).

Member Avatar for hericles
1
368
Member Avatar for slrobinson1983

Try this (untested by me) DELETE FROM data2 where id in ( SELECT id FROM data WHERE no_2 = no_1 + 1 AND no_3 = no_2 + 1 AND no_4 = no_3 + 1 AND no_5 > no_4 + 1 UNION SELECT id FROM data WHERE no_2 > no_1 + …

Member Avatar for invisal
0
255
Member Avatar for SimonIoa

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 …

Member Avatar for vishal.deep
0
156
Member Avatar for SimonIoa

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 …

Member Avatar for SimonIoa
0
460
Member Avatar for bLuEmEzzy

`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.

Member Avatar for bLuEmEzzy
0
2K
Member Avatar for hwoarang69

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 …

Member Avatar for pritaeas
0
1K
Member Avatar for RikTelner

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 …

Member Avatar for diafol
0
431
Member Avatar for davy_yg

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.

Member Avatar for hericles
0
99
Member Avatar for Muhammad_95

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 …

Member Avatar for gabrielcastillo
0
131
Member Avatar for AntonyRayan

No errors in your console log? Or is c never greater than d (the onblur is firing but your output never happens)?

Member Avatar for AntonyRayan
0
118
Member Avatar for LibraryCode
Member Avatar for LibraryCode
0
345
Member Avatar for LibraryCode

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++) {` …

Member Avatar for jkon
0
9K
Member Avatar for davy_yg

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...

Member Avatar for gentlemedia
0
231
Member Avatar for Ghost0s

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 …

Member Avatar for vegaseat
0
311
Member Avatar for Brandon_11

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.

Member Avatar for hericles
0
241
Member Avatar for apekodonkorjewel

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 …

Member Avatar for jwenting
0
324
Member Avatar for JustineAubrey

Firstly, to remove the obvious, if you were to run that query directly against the database how many results should you get?

Member Avatar for Zahraa_1
0
327
Member Avatar for Cory_1

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 …

Member Avatar for hericles
0
244
Member Avatar for shany0786

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 …

Member Avatar for diafol
0
346
Member Avatar for Ric_1

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 …

Member Avatar for hericles
0
995
Member Avatar for AntonyRayan

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 …

Member Avatar for hericles
0
172

The End.