889 Posted Topics

Member Avatar for hitro456

The DATEPART function might come in handy here. Not sure exactly how you could do it without writing a procedure, but take a look at the MSSQL documentation for the DATEPART function and see if you get any inspiration from it.

Member Avatar for sknake
0
136
Member Avatar for Celt.Max

Have you tried a HAVING clause instead of a WHERE clause? I don't really understand the difference, but sometimes HAVING works when a WHERE doesn't. Your query would become: [code] SELECT TS.col1, TS.col2, count(*) AS Number FROM view_scary VS LEFT OUTER JOIN table_scary TS ON VS.IdContact = TS.IdContact GROUP BY …

Member Avatar for sknake
0
132
Member Avatar for ryy705

Hi dirbacke and welcome to DaniWeb :) Please read the forum rules at the top of this forum. Also, please take note of the date of forum threads, particularly if they have been marked as solved, before posting. However it is always nice to see a new face here at …

Member Avatar for tux4life
0
225
Member Avatar for 2abani

[quote]the php file is my problem it is supposed to delete product and add a replacement for it [/quote] What is it doing instead? Do you get any errors?

Member Avatar for SoftwareDev
0
151
Member Avatar for syedabdulsamad

What do you mean by "Game Developer Software"? IDE, Modelling Software, Game Engine, Compiler, or something else perhaps? It will most likely be a matter of opinion anyway, can you narrow down your criteria of what you are trying to achieve? EDIT: Oh, are you also CMSHelper? Perhaps this is …

Member Avatar for eldod
0
125
Member Avatar for chupinette

It's a bit hard to tell from the code you have posted. Do you have code for the classes in question that you can post?

Member Avatar for chupinette
1
91
Member Avatar for cwarn23

There are no errors displayed because you are catching the exceptions and not doing anything with them. Try this to see what is happening: [code=java] } catch (MalformedURLException me) { System.err.println(me.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } [/code]

Member Avatar for padtes
0
126
Member Avatar for basketball4567

You can't use the == operator on a string comparison in java. You need to call the equals method like so: [code=java] if(input.equals("sixty")) [/code]

Member Avatar for darkagn
0
122
Member Avatar for shubhang

Hi Shubhang and welcome to DaniWeb :) I am sorry, but I don't understand what you are asking. Can you please post some code to show us what you mean?

Member Avatar for blackeyedanel
0
231
Member Avatar for aladar04

Simple example: [code=java] static int MAX_TESTS = 5; int test = 0; boolean result = true; int something = 6; while(test < MAX_TESTS && result) { result = (something > 7); test++; } [/code] EDIT: Basically, the while loop takes a boolean condition. This can be the result of a …

Member Avatar for aladar04
0
532
Member Avatar for snarb

Hi snarb and welcome to DaniWeb :) Your criteria are a little vague. -Send cursor to set coordinates and click -> not sure what you mean here. -Copy and store information -> if you mean permanently, then you need a language which can either write to a file or to …

Member Avatar for nats01282
0
101
Member Avatar for whitestream6

I would suggest reading up on the following functions in the PHP documentation as they will come in handy when dealing with dates: [URL="http://www.php.net/manual/en/function.date.php"]date[/URL] [URL="http://www.php.net/manual/en/function.strtotime.php"]strtotime[/URL] [URL="http://www.php.net/manual/en/function.strftime.php"]strftime[/URL] For example, to find the current year, use the following code: [code=php] $now = strtotime("NOW"); // timestamp of current date/time $currentYear = date("Y", $now); …

Member Avatar for darkagn
0
723
Member Avatar for kilermage

I'm no expert on bat files, but I would suggest changing the line that reads: [icode]java -Xmx500M -cp .;./classes/; server[/icode] to: [icode]java -Xmx500M -cp .;./classes/src/; server[/icode] and see if that fixes your problem.

Member Avatar for kilermage
0
72
Member Avatar for cwarn23

Actually I can see the benefits of the [I]initial[/I] proposal which mostly targets child pornography and terrorism sites. However I am a bit of a cynic. Once in place who's job will it be to say what is offensive and what is acceptable. I mean, we can't even get an …

Member Avatar for vegaseat
0
192
Member Avatar for jlego

When deleteing from multiple tables, you need to specify what is being deleted. There are two available syntaxes: [code=mysql] DELETE table1, table2 FROM table1 INNER JOIN table2 ON table1.id = table2.id WHERE table1.id = 1 [/code] or: [code=mysql] DELETE FROM table1, table2 USING table1 INNER JOIN table2 WHERE table1.id=table2.id AND …

Member Avatar for jlego
0
96
Member Avatar for darkagn

Is it possible to flag a Personal Message as Spam? I received two identical messages from a banned member today but couldn't find a way to report it.

Member Avatar for darkagn
0
195
Member Avatar for eawade
Member Avatar for LloydFarrell

All dates in MySQL are in the format: yyyy-mm-dd. Notice the hyphens and the number of digits ie 4 for the year, 2 for the month and 2 for the day. Today's date would be entered as 2009-12-24 and New Years Day would be entered as 2010-01-01. That said, if …

Member Avatar for diafol
0
134
Member Avatar for whitestream6

This line: [code=php] $result = mysql_query("select * from presenters;"); [/code] should be: [code=php] $result = mysql_query("select * from presenters"); [/code]

Member Avatar for DW Master
0
181
Member Avatar for pitulobo
Re: sql

Hi pitulobo and welcome to DaniWeb :), This can be achieved with a simple join in the two tables on the key InvNo. Have a try at it and post back if you are struggling with your code and we will see where you have gone wrong.

Member Avatar for darkagn
0
76
Member Avatar for Facte

Where is $fullurl set? Also, $b[jobid] should be $b["jobid"] or $b[$jobid] depending on what you meant.

Member Avatar for jcanaway
0
178
Member Avatar for ap3x

You can use single quotes to do this. Take a look at the difference between these lines of code and you will see: [code=php] $foo = "Something witty..."; $blah = "Something strange..."; $string = "$blah"; // $string now equals the string {Something strange...} $string = '$foo'; // $string now equals …

Member Avatar for darkagn
0
90
Member Avatar for mrjoli021

You need to specify the relative path from the script calling the constructor, not from the class. For example, if your class and xml file are in the /classes folder, then you need to call $mysql = new sqlConnection("classes/path.xml"); I know that may seem strange considering that the class is …

Member Avatar for darkagn
0
101
Member Avatar for AycheKay

You could try: [code=php] if(isset($_POST["restroomsyn"])) $restroomsyn = ($_POST["restroomsyn"]); else $restroomsyn = null; [/code] Then when you are inserting use is_null to check for null and set the column to NULL in this situation.

Member Avatar for darkagn
0
155
Member Avatar for bimaljr

Not sure of the maximum size, but you may want to think about the effect of having a 1MB script on your bandwidth and website performance during peak periods.

Member Avatar for samarudge
0
77
Member Avatar for ko ko
Member Avatar for shariqmsit

Hi shariqmsit and welcome to DaniWeb :) "hospital administration database" is pretty abstract. I think you need to define what is required a bit more than that before you even think about database design.

Member Avatar for smart77
0
82
Member Avatar for rukshilag

The main method in a java application has the following signature: [code=java] public static void main(String[] args) [/code] If you are a beginner I would suggest starting with something a bit simpler than a JButton's click method. But the theory behind it is to add an ActionListener to your button. …

Member Avatar for darkagn
-1
86
Member Avatar for sim_pack

Without the parameter, the printer_open function attempts to find the default printer from your php.ini settings. If it can't find them it will then use the default printer of the machine running the script. It is always recommended to specify the printer name if known, or prompt the user for …

Member Avatar for sim_pack
0
242
Member Avatar for darkagn

Hi all, I have seen code of the form: [code=php] if(file_exists("foo.php") include("foo.php"); else include("blah.php"); [/code] As far as I know, this is perfectly legal in php. What I was wondering was is it possible to do the following in in-line code in PHP? [code=php] if(file_exists("foo.php") // contains a specialised version …

Member Avatar for darkagn
0
223
Member Avatar for alreem

Hi alreem, We can only help you if you show that you have made some sort of an attempt. Do you have an algorithm or some code that you have tried? We may be able to point you in the right direction if we can see what you are thinking...

Member Avatar for VernonDozier
0
129
Member Avatar for Bluesilver

Instead of: [QUOTE][code=java]System.out.println("join method test = " + join('a', 'b', 'c'));[/code][/QUOTE] you want to call join like so: [code=java] // build a char array containing the three characters you tried char[] chars = new char[3]; chars[0] = 'a'; chars[1] = 'b'; chars[2] = 'c'; // pass the array into the …

Member Avatar for darkagn
0
194
Member Avatar for josh06

I don't believe that you need a profile_id, just use the user_id as the key in the profiles table. When you create a new user, insert a record into both tables. When you delete a user's account, delete from both tables. To access the profile of a user, you can …

Member Avatar for josh06
0
126
Member Avatar for kegathor

Use the SUBSTRING function. [code=mssql] SELECT SUBSTRING(ImageLink, 2, 100) FROM TheTable -- the 2 indicates start at index of 2, the 100 will give you the next 100 characters in the string "ImageLink" [/code]

Member Avatar for kegathor
0
119
Member Avatar for hallwayantics

You type [icode]java Hi[/icode], there is no need to specify the ".class" to run your program. Also, you will need a main method in that class to run the program.

Member Avatar for Makoto1981
0
192
Member Avatar for endisbegun

In order to run a method that takes an array of integers and returns their sum, your method will need the following signature: [code=java] public static int sumArray(int[] anArray) [/code] Then, instead of having the line [icode]sum = sum + anArray;[/icode] in your main method, after your loop you can …

Member Avatar for endisbegun
1
862
Member Avatar for phouse512

You can't use a switch statement like the way you are attempting. Try changing those switch statements to if-else statements and you should be fine.

Member Avatar for network18
0
1K
Member Avatar for Chad Gary

You can simply pass the Count to the Max function like so: [code=mySQL] select max(count(ProgramType)) as MAXCOUNT from credential_state group by ProgramType [/code]

Member Avatar for darkagn
0
73
Member Avatar for bibiki

Not sure if this is your problem, but I think you may need a <body> tag between your <html> and <table> tags.

Member Avatar for bibiki
0
800
Member Avatar for benkyma

[QUOTE=benkyma;1044108]I need to make ten selections. One of all the datetimes in the last 24 hours, the next one from 24 hours to 48 hours, and on back in 24 hour blocks for the last ten days. I've tried various approaches to this, but this is what I currently have: …

Member Avatar for benkyma
0
90
Member Avatar for hno

There are lots of free site map generator tools out there. One of the most popular ones is Google's phpSitemapNG. [URL="http://enarion.net/google/phpsitemapng/"]Here[/URL] is a link to the home website for this tool.

Member Avatar for darkagn
-1
65
Member Avatar for newtodaniweb

The line: [code=php] new Cite; [/code] means that there needs to be a class called Cite, not a file called Cite.php. Even if there was a Cite class, the code in the wfCite function wouldn't need that line as it doesn't reference the object after that. Remove that line and …

Member Avatar for newtodaniweb
0
191
Member Avatar for Carrots

The call to mysql_query returns true if it is successful, false if it is not. You can therefore call it inside the condition of an if-statement. I believe you can do that in C++ too if the function call returns a boolean result. In PHP you don't HAVE to use …

Member Avatar for leviathan185
0
212
Member Avatar for cwarn23

Lots of noobs have trouble connecting to a MySQL database and running queries, displaying results etc. Another good tutorial might describe the differences between the popular browsers such as IE, FF, Safari, Chrome etc. All good web developers need to know what to expect, but too many only focus on …

Member Avatar for cwarn23
4
648
Member Avatar for hedwards09

Sorry hedwards09, we can only give homework help to those that make an attempt first. Can you post what you have so far with the specific problems you are having? If you haven't started coding yet, what ideas do you have so far? We may be able to guide you …

Member Avatar for brownjohn
0
121
Member Avatar for bhoop
Re: java

Hi bhoop and welcome to DaniWeb :) There are tools out there that allow you to create an exe from a java application. However this defeats one of the main advantages of java, portability. You would need a pretty good reason to go down that path, I believe...

Member Avatar for P00dle
0
95
Member Avatar for Ballen92

Hi Ballen92 and welcome to DaniWeb :) What's the error message you get? If I had to guess on the information you've given us, I would say that the method addKeyListener is not defined for your class. What class does Robot extend?

Member Avatar for Ballen92
0
787
Member Avatar for iamsmooth

I think if you remove the line [code] traverseInOrder.successor.predecessor = newNode [/code] your algorithm will be correct. Remember, node.successor.predecessor should always equal node unless node is the last node in the list. Same with node.predecessor.successor, unless node is the first in the list.

Member Avatar for iamsmooth
0
149
Member Avatar for johndoe444

I believe it is possible to set a flag to generate javadoc for private/protected fields and methods. I think its [icode]-private[/icode] or something like that. Google might be able to help you some more on that.

Member Avatar for darkagn
0
230
Member Avatar for dwdata

Has your session started correctly before the call to your function? Check by echo'ing $_SESSION["Last_Page"] and make sure it's what you expect. What error message do you generate?

Member Avatar for darkagn
0
107

The End.