Jump to content

SkilletZA

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by SkilletZA

  1. Hi all Noob here! I am busy writing a web app that posts fuel usage data into a MySQL DB. Some records get added into the DB on the day that the vehicle leave the site. This will include the 'OpenKM' field. On the return of the vehicle the 'CloseKM' gets updated (added) into the record. I would like to have 'Consump' field to contain (CloseKM-OpenKM)/(MillDiesel+OutDiesel) I am trying to figure out SQL Triggers, is that what I need to use to have this working? Any help would be greatly appreciated.
  2. What an awesome forum!! Thanks for the VERY quick assistance guys!
  3. Hi Guys Noob here. Trying to browse MySql data through PHP script but getting this error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\browse.php on line 8 This is the piece of code causing this: <?php $connect = mysqli_connect("192.168.0.3","demo","demo"); mysql_select_db("my_db"); $query = mysql_query("SELECT * FROM persons WHERE Age = '28' "); WHILE($rows = mysql_fetch_array($query)): $FirstName = $rows['FirstName']; $LastName = $rows['LastName']; $Age = $rows['Age']; echo "$FirstName $LastName $Age"; endwhile; ?> Pleas help!
×
×
  • 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.