889 Posted Topics
Re: Hi inazrabuu and welcome to DaniWeb :) You can nest SELECT statements in an INSERT statement to get you what you need. For example, [code=sql] -- insert into which table the values INSERT INTO A.t (id, username, email, password) VALUES -- from the other database (SELECT id, username, email, password … | |
Re: You could have a hyperlink in an HTML page that links to another HTML page that contains a Java Applet. Not sure if that's what you are after though... | |
Re: [QUOTE=cwarn23;842150]Just a note on that. Sessions do use cookies. For a session to know which computer the session applies to, the session must either send a cookie to the client as proof of identity or have that identity code in the url. So in most cases it doesn't matter if … | |
Hi to the DW tech staff. I was thinking about the Location field in the public profile page for members as we have discussed it recently in this forum since it has been removed from the title bar for posts. Anyway I was thinking that it would also be handy … | |
Re: Hi nathenastle, Please take the time to read the forum rules. In particular, how to post code using code tags. In response to your problems, I don't really understand your question sorry. What do you mean by "the other mails getting decoded data"? If you uncomment $mime_boundary, your Content-Type line … | |
Re: Both the Integer and Double objects extend Number. So you could do the following: [code=java] public static Number sum (Stack<Number> stack) { [/code] Note that this method will require you to check if the numbers are Integers or Doubles. Also, remember that you can't use the + operation to add … | |
Re: Can you re-post say lines 120 - 137 of the file sign_up.php for us to look at please? | |
Re: This is done in Apache server's .htaccess hidden file. If you google for information on how to change the settings in .htaccess you will find many examples. | |
Re: Hi f0rb35 and welcome to DaniWeb :) [URL="http://au2.php.net/manual/en/ref.mssql.php"]Here[/URL] is a link to the MSSQL functions in the PHP Manual. Many of the functions correspond to similar MySQL functions, so it shouldn't be too hard to translate any of those MySQL tutorials to MSSQL. Have a go, if you get stuck … | |
Re: I think you problem is that you don't have quotes around the $nt array indexes. This should fix your problem: [code=php] print'<option value="'.$nt['ugid'].'">'.$nt['ugname'].''; [/code] | |
Re: Hi testing321 and welcome to DaniWeb :) Hint 1: You can make use of certain String functions to work out the characters in the String, such as charAt(). [URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html#charAt(int)"]Here[/URL] is a link to the charAt function's documentation. Hint 2: You can tell if a number is odd or even through … | |
Re: [code=php] $tmp =$_REQUEST["check1"]; $tmp .= ",". $_REQUEST["check2"]; $tmp .= ",". $_REQUEST["check3"]; [/code] BTW, please use code tags. | |
Re: I'm not sure what you are trying to achieve by running the trigger as another user. I think this would cause you more headaches than it would solve. "I'm not very confortable with that since I must open my main database to the user of the inserting application or even … | |
Re: Upsilon is very close with that query. I will extend to give you the minimum value: [code=sql] SELECT min(value) as value FROM table_name HAVING count(value) = 1 [/code] | |
Re: imagedestroy() is used to free memory assigned to an image resource stream. I haven't tried it out, but I assume it can be used to free [I]any[/I] image resource stream created by the GD package. By tmp folder, are you referring to file upload tmp folder? If so, open the … | |
Re: [QUOTE=rm_daniweb;841207] [ICODE]<?php include("html_mailer.php"); $obj = new html_mailer.php; $email = "xxx"; $age = "72"; $sex = "Male"; $obj = sendWelcomeHTMLMail($email, $age, $sex); ?> [/ICODE][/QUOTE] This code contains incorrect syntax. See corrections below: [code=php] <?php include("html_mailer.php"); $obj = new htmlMailer(); $email = "xxx"; $age = "72"; $sex = "Male"; $obj->sendWelcomeHTMLMail($email, $age, $sex); … | |
Re: Hi mdmarcial and welcome to DaniWeb :) [QUOTE=mdmarcial;836129] I've come up with seven entities / tables so far which are: CLIENT{ClientID, Firstname, Lastname, StreetAddress, Suburb, State, Postcode, PhoneNumber} PROJECT{ProjectNumber, Description, Startdate, Duedate, Pricetype, Quotedprice, FinalPrice, Status, DateCompleted} STAFF{StaffID, Firstname, Lastname, Contact#, BillingRate, Position} PROJECT MANAGER [COLOR="green"]([I]because each project is assigned … | |
Re: Hi forzadraco, Please use code tags when posting code as it makes it much more readable. If you have a question, please do not hijack an old thread, create a new one instead and clearly state what it is you are trying to do and any errors you are getting. … | |
Re: Without access to the website's database I'm thinking this would be very difficult to do. What you are essentially talking about may have legal ramifications also. | |
Hi all, I am trying to run a javascript function, RH_ShowHelp, that is stored in the file RoboHelp_CSH.js. The function itself should open a popup window containing our product's help system (written with Adobe RoboHelp) and the javascript file was supplied by Adobe as the standard call. I have managed … | |
Re: A foreign key constraint is used to stop you from inserting data into the table without a corresponding record existing in another table. The ID field in the table you are inserting into must match the ID field of a record in the table t1. | |
Re: For primary key, try to insert a new record with the same PK as an existing record. If you can't, then the PK is working. For a foreign key, try to insert a new record where the FK doesn't equal a record for the referenced field. If you can't insert … | |
Re: Something like this should work: [code=sql] SELECT a.id, a.prod_id1, b.description as desc1, a.prod_id2, c.description as desc2 FROM comp_items a INNER JOIN products b ON a.prod_id1 = b.prod_id INNER JOIN products c ON a.prod_id2 = c.prod_id [/code] | |
Re: Algorithm: First, get the date that they joined and convert to timestamp (strtotime function) Next, get todays date in timestamp format (time function) Then subtract current time from joined time Now, number of seconds in one day is 24 * 60 * 60. Use this figure to calculate the number … | |
Re: About 50% of my job is in documentation and technical support. There are many help authoring tools out there and in general you get what you pay for. [URL="http://hat-matrix.com/"]http://hat-matrix.com/[/URL] might be able to help you find one that suits your needs. Personally I would recommend Adobe's RoboHelp (this is the … | |
Re: Change GROUP BY to ORDER BY in the second query. I think this will give you the result you are looking for. | |
Re: [code=php] if($row2['admin'] == 1 && $admin_user_level == 0) [/code] I can't see anywhere in your code where $admin_user_level is set. Is it possible that this is not correctly being set for the user? Try this immeadiately before that line: [code=php] echo "POST_ADMIN: " . $row2['admin'] . "<br>"; echo "ADMIN_USER: $admin_user_level<br>"; … | |
Re: Try [icode]ORDER BY RAND()[/icode] instead of NewID() | |
Re: Not 100% sure what you are asking here, but couldn't you just read/write from/to a File when you load/save the design? | |
Re: Nice Dani :) I especially like the fact that the quick forum index contains links to the three forums I reply to the most. I notice that the main section of the screen lists the latest forum posts and blog posts, but I don't usually visit the blogs. How was … | |
Re: [icode]table[/icode] is the name of the table in the database. [icode]$database[/icode] in your example will contain a result set of rows from the database according to the query passed into the [icode]mysql_query[/icode] function. It should probably be named $result instead of $database to give you a clearer understanding of what … | |
Re: [code=php] $A = $row['foo']; [/code] Here 'foo' must match the column name in the table you are trying to access. Try outputting $A to see if it is correctly being assigned: [code=php] $A = $row['foo']; echo $A; // ... [/code] | |
Hi all, Not sure if this is intentional, but it seems that the member info displayed in the top right corner of the title bar for posts has lost miscellaneous information such as Location. I have attached an example of one of my posts, normally it displays my location as … | |
Re: It is perfectly feasible to use the include function more than once. Any inline code in the included file will be run as though the included file were run. This can sometimes cause unpredictable results and requires certain amount of care, particularly with variables. Maybe post some of the code … | |
Re: I think for this purpose you will want to use regular expressions. Check out the API for the [URL="http://java.sun.com/javase/6/docs/api/java/util/regex/package-summary.html"]java.util.regex[/URL] package. | |
Re: Hi frenchwr and welcome to DaniWeb :) [URL="http://dev.mysql.com/doc/refman/5.1/en/index.html"]This link[/URL] will be useful for you, it is the reference manual for MySQL 5.1. Are you storing the variables in PHP? PHP has a mysql_fetch_array function, which is why I thought this. Or are you working with another language, or purely in … | |
Re: Personally I would prefer not to see DaniWeb tread that path. | |
Re: Yes this is certainly possible. You will need to read up on the java.io package. Pay particular attention to the File and *Reader classes. The condition part is a simple if-statement... | |
Re: [QUOTE=BestJewSinceJC;833647] On to the programming, I can come back and give you some more help tomorrow. For now, you might want to consider that "cents" can be much greater than 200. It looks like your code in the add method will not work if cents is > 200. (Lets say … | |
Re: You have two choices. The easiest way is to set the $CONF array to global in the functions that use it. Like so: [code=php] function foo() { global $CONF; // do something here with $CONF } function bar() { global $CONF; // do something else here with $CONF } [/code] … | |
Re: Try to avoid using port numbers < 1024 unless for their original purpose. They are loosely called "reserved port numbers" because they are used for very specific purposes. Technically you can use them, but you will be blocking what might be an important service from operating while you do. EDIT: … | |
Re: Hi cvarcher / Rick and welcome to DaniWeb :) All of your code looks ok to me, so I am going to ask a few obvious questions: Firstly, is there a record in the jos_membership table with the supplied ID? Is ID the entire Primary Key of the table? - … | |
Re: Hi debeginin and welcome to DaniWeb :) I'm pretty sure MS SQL Server 2000 is a stand-alone install. I know later versions require the .NET Framework, but from memory you should be able to just install SQL and away you go. If you are asking what program do you run, … | |
Re: Hey javaman2, What happens with your program if you have $10.30 minus $5.60? What result do you get? | |
Re: Check out the documentation for the [URL="http://au.php.net/manual/en/function.strftime.php"]strftime[/URL] function. What you want to do is get the current timestamp ( use time() ) and the timestamp for your time in 7 days (use strtotime() ), get their difference and then use the strftime function to get the string in the form … | |
Re: Hint: Your method signature for the add method should look like this: [code=java] public static Money add(Money m3, Money m4) [/code] The method should add the dollars and cents of each Money object and return another Money object. You will need to take into account what happens when you add … | |
Re: What are the tid and uid columns used for? I think I would have a column for ID of the reply, TopicID for the ID of the thread that it was posted to and a column for ParentID for the ID of the reply that it was posted against. This … | |
Re: Are period and month the same thing? What do you define as a working day? Are you wanting to only use MySQL to do this or are you combining with another programming language such as PHP? | |
Re: Hi srpa01red and welcome to DaniWeb, This is certainly doable. But I have to ask, if the third table only contains those two fields, is it necessary to create the third table? From the looks of the structure of the second table, you already have that information in that table. … | |
Re: area = (radius * 3.14)^2; Two things: first, the area of a circle is PI * r^2 not (r * PI)^2. Secondly, the java compiler doesn't recognise the ^. You need to use the Math.pow method to raise something to a power, but in this case it is easier to … |
The End.