Jump to content

nec9716

Members
  • Posts

    78
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nec9716's Achievements

Member

Member (2/5)

0

Reputation

  1. ok I get that working now if I want to have avg and total in the same command how can I set that or do I have to make 2 separate request? presently I have something like that: $sqlt = 'SELECT avg (litre) as liters , (mpg) as mpg FROM gb1 ';
  2. ok here what is my issue: $litres= 'SELECT avg (litre) FROM gb1 '; I want to be able to have more avg from gb1? thank you and have a great day
  3. How can I do to change background on a PHP page. do I have to go in html to do that? like: <?php ?> <body background=ccccc.jpg> </body> <?php> ?>
  4. ..thank you ....that work fine for me .... thank's again
  5. I want to be able to see my value with a dollard sign "$" <td width=10% align='center'>$price</td> so what I have to change?
  6. just try it and it's work fine .....sometime .....I'm surprise ....but this time ....I'm....... well I feel...... :-X. HAKU ....why you write ",0,0 here ......$results = mysql_result($results, 0, 0);.....? thank you .....
  7. ok here how I have write it: $sql = 'SELECT avg (total) FROM truck '; $results = conn($sql); echo "<tr> <td >$results</td> </tr>"; but that print......Resource id #3
  8. thank you it work fine now.... thank again
  9. yes ...just try it as well..... now if I want to round a value of a variable like: $total = $row['total']; $totalr = round($total,2); is that the way to write that? thank you .....
  10. I really apologize...type mismatch..... i have write that: $totalr = round(10.333333, -2); but ....there no "-" $totalr = round(10.333333, 2); sorry
  11. When I run that: $totalr = round(10.333333, -2); I should have something but the print value of $totalr is always 0.....I was thinking to see something like 10.33 but no luck
  12. ok i get that working now ...table need to be empty ... now my next question is : is it just the primary key who can be put in relationship between tables? Thank you
  13. I want to create relation between table but I have an issue. not sure if I write the line properly? alter table `matnphil_f1`.`pick` add constraint `FK_pick` FOREIGN KEY (`id`) REFERENCES `user` (`userid`) do the table need to be emty to do that? presently I have data in all table ..... thank you
  14. how can I show in a form data come from 2 different table? what I have presently: $sql = "SELECT * FROM pick ORDER BY pick.name ASC"; $rows = mysql_fetch_array($result) $qpname = $rows['name']; $qdriver1 = $rows['driver1']; echo "<tr style='background-color:$bgcolor;'> <td ><a href='".$_SERVER['PHP_SELF']."?id=$id'>$qpname</a></td> <td >$qdriver1</td> </tr>";$id = $rows['id']; so how can I do to have data from another table ? thank to all have a great night but I need to show data come from
×
×
  • 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.