Jump to content


  • Posts

  • Joined

  • Last visited


About paul2463

  • Birthday 06/15/1966

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location

paul2463's Achievements


Member (2/5)



  1. and if you would have put this <?php $order = "SELECT * FROM `order_notes` WHERE order = '4'"; $result = mysql_query($order) or die ("error in query " . mysql_error()); //the "or die" bit would have told you that an error existed in the query and would have been easier to debug // the other errors all stem from the fact that the query was in error, so no results resource to work with ?> regards
  2. have a look here, this is a javascript version of what you want, when you view source you get a warning sayin you can use the function, you can then pull it apart and make it a php script here is the link <a href="http://www.uky.edu/KGS/gis/converter.htm">Lat-Long Converter</a>
  3. there are no table creation scripts in there,just insert scripts, if the database has been created ( book_sc I presume) and no tables are present, then the insert scripts cannot insert into a table that does not exist
  4. also a duplicate entry also in javascript help!!!!!!!!
  5. why would you want to send the information to ttwo pages for? if you need information to go to two pages send it to the first then place what you need to go to the second page in the url as a header from your first page
  6. what doesnt work about it???
  7. thanks printf a one line function...love it
  8. Hello Guys. a simple question for all you friendly people out there who know more than me, or I would not be asking the question I would be answering myself... I am setting up a very very simple auditing page for out internal electronic workshop, it has a mysql table back end, this table has a few fields but one of them is the "status" field, when a job is taken into the workshop it is set to default "0", when work actually starts the status goes up to "1", when testing starts it goes up to "2" and so on until it is handed back to the user....so every day we can can print out the status of all jobs in the workshop. I would like to write a simple function that updates the value of "status" by incrementing it by 1 when certain buttons are pressed, here is my idea [code] function updateStatus($id) { increment value of status by 1 where id = $id } [/code] now for the question (got there eventually) is there a sexy PHP/MySQL function to increment a table value by 1 or do i need to query the table to get the value, add 1 to it then update the table by setting the status field to the new value?? please be content that no animals will be hurt in the development of this function
  9. If you have numbers written in text or characters, and you want to sort them in Ascending order  and you don't want this: mysql> select number from (table) order by number; +--------+ | number | +--------+ | 1      | | 10    | | 2      | | 3      | | 4      | | 5      | | 6      | | 7      | | 8      | | 9      | +--------+ Use this: mysql> select number from (table) order by (number+0); +--------+ | number | +--------+ | 1      | | 2      | | 3      | | 4      | | 5      | | 6      | | 7      | | 8      | | 9      | | 10    | +--------+ The (field + 0 ) converts the text/character in the field into an integer. Alternativley remap your table so that the column containing the numbers is type "integer"
  10. sounds like homework to me........ by the way to help you along, Prime Number -> a number that is only divisible by itself and 1................lets look at part 3 of your list.....after reading this definition the number of odd prime numbers will be the total number of all prime numbers in your list when you get it working.....there is no such thing as an even prime number because it will be at least divisible my itself, 1 and 2, maybe even more, thus not making it a prime number...teacher head off now...thanks for listening
  11. http://www.phpfreaks.com/MySQL_Reference/Column-Types/2.php
  12. Have a look at this site http://www.phpfreaks.com/MySQL_Reference/Column-Types/2.php hope it helps other than that read the manual
  13. Nothing to do with PHP.  No server side language can determine that without attempting to setting a cookie then having the client do another request.
  14. still missing the semi-colon at the end of the implode line, not a question mark
  • 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.