Is there a way to create a query that only updates if the passed value is greater than the current value.. something like this (obviously doesn t work but portray intent):
UPDATE `table` SET (if `field < $total ) {`field` = $total } WHERE `ID` = $id ;
I am using a simple php login script uses a mysql database. there is also an add user function. I need to set a minimum character limit so that someone doesn t just hit add user- adding blank values- and letting anyone login by just clicking login. Help would be great. Thanks- Tim
How much is a MySQL database and where do i get one
I ve been trying to make it so I dont have upload my php files to my webhost every time I change something to see if its working- I ve gone to php.net and mysql.com and I couldn t get them working.
Someone said I try WOS Portable- which I ve got installed- but still the files dont show the PHP- another friend said EasyPHP but I cant get that to work either.
Does anyone have any ideas?
I am trying to select a bunch of information from a single database and then present it in the form of a table on my webpage. The data comes out fine but is just formated in block text with no table features.
Code:
$sql = "SELECT * FROM Software;";
$result = mysql_query($sql);
echo <table> ;
while($row = mysql_fetch_array($result))
{
echo <th>- . $row[ name ] . -</th> ;
echo <tr> . $row[ website ] . </tr> ;
echo <tr> . $row[ description ] . </tr> ;
echo <tr> . $row[ up ] . - . $row[ down ] . </tr> ;
}
echo </table> ;
mysql_close($db);
No comments:
Post a Comment