[PHP-DB] ****Newbie Question****

2002-09-27 Thread Ron
I am use to running MySql & PHP but now I am running into a situation, where the website I am admin at is changing the server over to MSSql is the and easy way to convert all the existing data and webpages from MySql to MSSql. Any assistance with this would be greatly appreciated..TIA

[PHP-DB] ***Newbie Question***

2002-09-27 Thread Ron
I have an issue I need to see if I can resolve. I am and admin of a company website that uses MySql for the database, They are going to change the server to MSSql is there and easy way to convert on the existing Info over from MySql to MSSql any help would greatly be appreciated . TIA

Re: [PHP-DB] Flush database

2002-09-27 Thread wade
Thank you, I think this will help me greatly. It was the mktime(function) that was throwing me for a loop. Thank you all for your help also! Micah Stevens wrote: > Using UNIX timestamps: > > if (time() - $timestamp > mktime(1,0,0,0,0,0)) { > // Difference it greater than one hour

Re: [PHP-DB] Flush database

2002-09-27 Thread Micah Stevens
Using UNIX timestamps: if (time() - $timestamp > mktime(1,0,0,0,0,0)) { // Difference it greater than one hour. Perform rejection code here } else { // Difference is one hour or less. Perform acception code here. } At 04:35 PM 9/27/2002 -0500, wade wrote: >So how w

RE: [PHP-DB] Dates

2002-09-27 Thread John Holmes
>    I am doing a database of things that have dates, some I know the month >and year of, some I only know the year. I suppose I could do a field for >the year, and one for month, and then allow the month to be NULL. But is >there a date type that allows years and  / or months??? If that's all y

[PHP-DB] Flush database

2002-09-27 Thread wade
So how would one compare the timestamp? how would you write if timestamp is greater than timestamp + 1 hour { Ok to view page run query to update that IP to new timestamp --> I think this will be better than a delete statement } else { Can't view page } I know you

Re: [PHP-DB] Flush database

2002-09-27 Thread Brad Bonkoski
Sounds like we are all on similar pages with timestamping, but if you issue a delete query every time the page is viewed it could create some sub-par performance based on number of hits. i.e. if the site gets 100 hits in the first 10 minutes of operation, it would issue delete logic and queries 1

Re: [PHP-DB] Flush database

2002-09-27 Thread Jim Hunter
First make sure that you are storing the IP and the time it was saved in the database. Then I would have 3 queries: 1) a query to see if the IP address is in the database and less then an hour old. 2) a query to save the IP and time into the database 3) a query to delete all entries over 1 hou

Re: [PHP-DB] Flush database

2002-09-27 Thread Brad Bonkoski
How about writting the IP address to the database with a timestamp, then when a matching IP address arrives you view the timestamp and if it has been more then a hour, they can view the page, which would force you to update the timestamp. Of course you would probably need to write a stand-alone (

Re: [PHP-DB] Flush database

2002-09-27 Thread Ignatius Reilly
why not simply store the server time at log in in the DB after a successful log in together with the IP address; and at the next log in request perform a SQL time difference comparison? Ignatius - Original Message - From: "wade" <[EMAIL PROTECT

Re: [PHP-DB] Dates

2002-09-27 Thread Micah Stevens
May I recommend setting the field type to INT, and just using timestamps? That's what I usually do, then you can manipulate things however you want. Much more convenient than the date style type I think. Looking at how the MySQL docs talk about the DATETIME field, I bet the database is doing j

[PHP-DB] Flush database

2002-09-27 Thread wade
I am storing IP addresses in a database, but after an hour has passed I want to delete all the IP addresses from that database. I want to do this based on the server time. Example.. Someone comes to my web page, I store their IP address in my database. So now I write a PHP script that says if that

[PHP-DB] Dates

2002-09-27 Thread Steve Vernon
Hiya,     I am doing a database of things that have dates, some I know the month and year of, some I only know the year. I suppose I could do a field for the year, and one for month, and then allow the month to be NULL. But is there a date type that allows years and  / or months???       Tha

[PHP-DB] Session......

2002-09-27 Thread Rodrigo
Hi again people. i´m including the code below in every page in my site, // logar novamente ou entre em contato com o mailto:[EMAIL PROTECTED]";>webmaster.'); } ?> /// in one page i used: session_register($repcod); but i can see this VAR only in

Re: [PHP-DB] Re: ODBC?

2002-09-27 Thread Andrew Hill
And if you are using ODBC from *nix, you will want to configure it --with-iodbc as per the HOWTO at www.iodbc.org. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software - http://www.openlinksw.com On Tuesday, September 24, 2002, at 10:34 AM, Ever Lopez wrote: > First ma

Re: [PHP-DB] to determine how much server space left on the web server?

2002-09-27 Thread nikos
exec command return only the last row of the result. Try backtrics (``) operators (not '' quots): e.g. $output = 'df -h'; echo "$output"; > > exec("df -h"); > > ?> > > On Tue, 17 Sep 2002, Bo wrote: > > > Any ideas of how to write a php script to determine the disk space left in > > my account

SV: [PHP-DB] Current row of query

2002-09-27 Thread Henrik Hornemann
Actually you dont need to keep track of the row number. Yoy could just alternate the two colors like this: while ( $row = mysql_fetch_array($result) ) { $bgCol = ( $bgCol == "#EADBC6"}?"#EFE1CE":"#EADBC6"; echo ".."; } hth Henrik Hornemann -Oprindelig meddelelse- Fra: Patrick

Re: [PHP-DB] [PHP-MySQL] lock a record of MySQL from PHP

2002-09-27 Thread Miles Thompson
1. Check MySQL syntax for locking a record 2. Build the query to do that, assigning it to something like $qry 3. mysql_query( $qry ) 4. Check for results HOWEVER - given that the web is a stateless environment, and a user can just close a browser, or walk away, or whatever, are you SURE you want

RE: [PHP-DB] Categorized list?

2002-09-27 Thread Cal Evans
http://www.amazon.com/exec/obidos/tg/detail/-/1558605762/qid=1033128099/sr=8 -1/ref=sr_8_1/104-0156092-0439928?v=glance&n=507846 (beware the wrap) Chapters 28 and 29 are on SQL trees. Beware this is a pretty deep subject and you need to be firmly grounded in SQL before reading it. That being s

[PHP-DB] dbx question - specifying a port for pgsql

2002-09-27 Thread Jeff Van Campen
Hello, We have been using dbx here at work, and it seems that it could be a very useful tool, since we use several DBMSs. However, on one of our servers, we have to run Postgres on a port other than 5432. After reading the documentation and finding nothing there, I took a look at the source,