Jump to content

[SOLVED] php and mysql


TheFilmGod

Recommended Posts

I am assuming you want to write the data back to the table...

 

Make sure you have a field where you can increment the times accessed, in this example it is called "count". Redefine it or use an existing to match your table structure:

 

<?php

$query = "SELECT * FROM `table` WHERE `column` = $variable";
$result = mysql_query($query);

?>

<?php
$cnt = $row["count"];
$cnt++;


mysql_query( "UPDATE table SET  count = '$cnt' WHERE column= $variable";");

?>

Link to comment
https://forums.phpfreaks.com/topic/43233-solved-php-and-mysql/#findComment-209917
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.