Jump to content

shivabharat

Members
  • Posts

    371
  • Joined

  • Last visited

    Never

Everything posted by shivabharat

  1. Hi, your question is bit vague here. Can you give me an example of what is that you are tyring to do here? Cheers Shiva!
  2. You dont have to explicitly check for true or false. [code]$insert = sprintf("INSERT INTO Users (FirstName, LastName, Usrname,Passwrd, AccessLevel, last_login,UserID)                         VALUES ('%s', '%s', '%s', '%s', '%d', '%s', '%d')",                             $FirstName, $Surname, $uname, $passwd,$accesslevel, $regdate, $_SESSION['UID']); $Reply = mssql_query($insert, $link); if ($Reply) {     echo "Data Inserted"; } else {   echo "Not Inserted"; } [/code]
  3. You can try something like this.....hoepfully should help you [code]<?php require_once 'Database.php'; $db = Database::connect('Database_Name'); $arg1 = 26; $arg2= 1; $myquery = "pSomeStoredProcedure ". $arg1.",".$arg2 $db->query($myquery); ?> [/code]
  4. Hi, If you are using MySQL refer DATE_FORMAT(date,format)  function.
  5. This is the output of the program                         ****************************                         ****************************                         ******** L-G-H Team ********                         ****************************                         ****************************                             the result is 6.285714                                 you got it :D press any key to exit...
  6. Hi, I did some testing and the search works fine without logging me out. Did you happen to fix the issue?
  7. Hummm very strange which compiler are you using. I tried using Visual Studio 6.0 and no errors.
  8. Hi Cohan, Thanks for the posting. Whenever you feel you need help please make sure you can narrow down the issue to an extend. I dont think we can go thorugh the long code which you have posted. Let uu know exactly were you think the issue is. Thanks
  9. Hi, You have to use the META tag for this [code]<meta http-equiv="refresh" content="2;url=http://mypage/index2.php">[/code]
  10. The code is running perfectly fine provided you have closed all the printf statements. Whats is the error you get?
  11. Please refer to this link [url=http://www.phpfreaks.com/forums/index.php/topic,2139.0.html]http://www.phpfreaks.com/forums/index.php/topic,2139.0.html[/url]
  12. Hi, Why dont you try to use the windows installer which is simple and easy. http://in.php.net/releases/index.php
  13. Can you be more clear on what you mean by IIS functions?
  14. 1. Open IIS 2. Select Default WebSite Properties 3. Go to "Web Site" Tab 4. Change TCP Port to desired port number (default is 80) 5. Click on Apply 6. Stop-Start you IIS Server.
  15. Please refer to the link in my singnature.
  16. Ho whave you stored the text file? Whats the data type you used?
  17. Hi, I guess your query needs to be like this. There needs to be some mapping between the two table (primary-foriegn) key relation. [b]assignmentdata table values[/b] [table][tr][td]3, 3, 'Sports (Action)', 10 2, 2, 'Portraits (1 straight, 1 environmental)', 10 1, 1, 'Photograph Something Meaningful', 10 [/table] [b]grades table values[/b] [table][tr][td]1, 1, 1, '9.0', 'Nice solution to a difficult...etc. etc.' 2, 1, 1, '8.0', 'Nice solution to a difficult...etc. etc.'[/table] [CODE] SELECT SUM(a.maxgradepoints) AS maxgrade, AVG(g.earned) AS avgrade FROM assignmentdata a, grades g where a.id=g.id[/CODE] [b]Output[/b] [table][tr][td]20    8.50000[/table] What I would suggest is to have your tables relations fixed. Go through the basics.
  18. Hi, There are different ways of connecting to the system. Using ODBC is one way and please refer the manuals for functions related to ODBC. Let us know if you have toruble getting started.
  19. Not sure if this will really help Please refer this tutorial [url=http://www.phpfreaks.com/tutorials/104/0.php]http://www.phpfreaks.com/tutorials/104/0.php[/url]
  20. What is the field type of "Passwrd" ? try using "binary" type if you havent.
  21. Hi, Please make sure you use the code tags when you post anything. Its becomes very hard for us to go thorugh your posting.
  22. Dont try it folks this is just another trick.
  23. You can set the privelage that the user will have on the database. Refer manual to set the privelage. You can also store the database that the user will be accesing along with the user name and password. You can retrive this information and make him access the database thats is specified.
  24. First thing Please DOnt double post ..... Now to your question You can use DATE_ADD function which is quiet handy select DATE_ADD(\'2004-01-11\',INTERVAL 7 DAY) We know a week has 7 days The above query will add 7 days to the given date The result of the above query would be 2004-01-18 Now you have to save the result and add till the date difference is ZERO SELECT (TO_DAYS(\'2004-04-17\')-TO_DAYS(\'2004-01-11\')) This query will give the date difference which is 97 So you need to maintain a variable which would also subtract \"7\" from this total and also add to the date. So when the result is ZERO it means that you have finished. I hope I am clear
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.