Time variable in php and sql db

2002-06-22 Thread Claudio Carbone
I have a mysql dbase. I use a time field to save a number of hours (think about number of houres spent out of office, or anything else). A table holds the global values for people and their status, another table holds every single entry of data, so john smith 5 hours and 2 minutes outside on 16-06

Max in query

2002-06-14 Thread Claudio Carbone
Is there a way to obtain max (or min) value in a query? Example: i want to know the last id in mytable table is there a way to do this query? something like select id from mytable where id = max; or something else? The one i wrote i tried it but it does not work. Thank you Claudio -

Re: Query problem

2002-06-11 Thread Claudio Carbone
Now it has transformed into this: "); } else{ print( "Non riesco a connettermi al server."); exit; } $user=$_POST['user']; $password=$_POST['password']; $query=(mysql_query("select * from admin where User='%$user%'",$link)); $row = mysql_fetch_array($query); if($row["user"]==$user

Query problem

2002-06-11 Thread Claudio Carbone
Hi all, it's the first time i use this ML and i'm pretty new to php and sql so please excuse me for every well known thing i say. I'm trying to make a little login routine. Here i post my code: "); } else{ print( "Can't connect to the server."); exit; } $user=$_POST['user']; $password=$