Jump to content

imartin

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by imartin

  1. I have a MS Sql table with a date field, the dates are in the Sql server timestamp format (number of minutes since the Universal Benchmark (midnight Jan 1 1900)). I'm using PHP to run queries such as [code]SELECT * FROM MyTable WHERE DateField > $date [/code] I know there is an easy way for the query to take $date as a UNIX TIMESTAMP and compare it to the time stamp format mentioned above because I have done it before, but I can't remember how I did it. Whats the best way to do this?
  2. Does index2.php return any PHP errors?  Do you have error reporting turned off?
  3. [quote author=Barand link=topic=109078.msg439550#msg439550 date=1158947873] What column type is the number column? If it is char or varchar, change it to a numeric type such as INT [/quote] If the colum is for prices, then INT type may not be a good idea, as there might be decimal points in the values.
  4. When you say "my pages dont work" you have to be more specific.  What exactly is the problem? because register globals off wasn't the only change in PHP. What error are you getting?
  5. We tried argo soft aswell but it just doesnt cut it, but then we found hmail, its absolutely perfect, check out this article; [url=http://wampjournals.com/article/Office/Running-Your-Own-Free-Emailserver/]http://wampjournals.com/article/Office/Running-Your-Own-Free-Emailserver/[/url]
  6. Are your php scripts running off the same box as the MSSQL
  7. Try out this article, runs through basic MSSQL queries. [url=http://wampjournals.com/article/Database/MSSQL-&-PHP/]http://wampjournals.com/article/Database/MSSQL-&-PHP/[/url]
  8. there may be times when Session_start(); wont be the very first bit of code, the important thing is that it comes before anything that will be printed to the file after processing.
  9. first page would be [code]$_SESSION['user'] = $user; $_SESSION['password'] = $password; [/code] second page would be [code]$user = $_SESSION['user']; $password = $_SESSION['password']; [/code] $_SESSION is an array, whatever vars you wish to cary page to page in your program can be put in this array as elements, you refer to these elements by the index you give them. ie, "user" is an element in the $_SESSION array that we set above, when you wish to refer to it you will use $_SESSION["user"], "user" being the index.
  10. [code] $db = mssql_connect("hostname","username","password"); mssql_select_db("databasename"$db) [/code] Same as connecting to MySql just has its own functions. Then as far as running queries, if you are familiar with MySql queries using php it shouldnt be too hard for you to figure it out for mssql, most of the php is the same just not as extensiveas you can see: [url=http://www.php.net/mssql]http://www.php.net/mssql[/url].
×
×
  • 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.