Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JSProgramIA

    PHP Math , Percentages

    Yeah I know, this is simple High School stuff, but I must have skipped that day. $unit_cost = "45.00"; $selling_price = "52.45"; $the_markup = ???; // Need percentage of markup here Embarrassingly thankful for any help.
  2. JSProgramIA

    mySQL Timestamp to PHP problems

    thanks for the "thoughtful db query" some of us, however, may not know there was even such a query available, until someone like yourself shares their knowledge. as you just did. thanks.
  3. JSProgramIA

    mySQL Timestamp to PHP problems

    PERFECT! What a great function. This worked as I wanted: <?php echo date("F j, Y, g:i a", format_data($row_Recordset1['when_it_happened'])) ?> Thanks! This one will be going in my library for sure.
  4. JSProgramIA

    mySQL Timestamp to PHP problems

    Tried that. I am being returned the following incorrect date based on the example above: 12-31-1969 15:59:59
  5. JSProgramIA

    mySQL Timestamp to PHP problems

    The Problem: I am retrieving a timestamp field from a mySQL database running on Apache. I am trying to take this timestamp, and within PHP convert it to something actally readable. The record is being returned as follows: mysql> select last_updated from hours where project_id =2...
  6. JSProgramIA

    PHP autocomplete in text box?

    oops.
  7. JSProgramIA

    PHP autocomplete in text box?

    more specifically... http://ajax.zervaas.com.au/examples/GoogleSuggestCloneJax/
  8. JSProgramIA

    PHP autocomplete in text box?

    ok i googled it for ya: http://ajax.zervaas.com.au/examples/GoogleSuggestCloneJax/
  9. JSProgramIA

    PHP autocomplete in text box?

    google "google suggest clone". the example is php, mysql, and would fit in nicely for you. i used it in my last project.
  10. JSProgramIA

    Is there a better way to do this?

    :) Thanks D! That is what I wanted!
  11. JSProgramIA

    Is there a better way to do this?

    The thing is, the user can change the email, so thats why i used those weird ::variables:: so i can easily replace them with data from the data source.
  12. JSProgramIA

    Is there a better way to do this?

    Ok here it is in context: In a database there is a string like this: On ::date:: we worked on project ::project name:: and spent ::hours worked:: on it. ( etc ). Is it possible to have an array of the things we are looking to replace in the string ( the ::variable:: ) and yet ANOTHER array of...
  13. JSProgramIA

    Is there a better way to do this?

    actually i meant all the str_replace's. do you see a pattern similar enough to make a function there?
  14. JSProgramIA

    Is there a better way to do this?

    by better I guess more efficient, less code maybe? . . . $emails_row = mysql_fetch_array($emails_result); $message = $emails_row['emails_text']; // Replace values $message = str_replace("::company name::", stripslashes($emails_row['company_name']), $message); $message =...
  15. JSProgramIA

    Return Array from Function? How?

    NEVER MIND I AM AN IDIOT!!!!!!!! Can you see it? function getProjectInfo($projectId){ // Retrieve info for supplied project ID // Returns $row $page_sql = "SELECT * , total_hours-hours_paid AS hours_owed, DATE_FORMAT(last_updated, '%m-%d-%Y') AS last_update FROM `project` INNER JOIN...
  16. JSProgramIA

    Return Array from Function? How?

    print_r within the function works. print_r outside of it returns NULL.
  17. JSProgramIA

    Return Array from Function? How?

    I was assuimg a lot in my last post. I will be more specific. 1. My connection is included via: <? include ("includes/config.php") ?> I don't know. I was just trying it. In reality, my SQL is a lot longer and does return rows (as confirmed by Navicat). So for the sake of this example...
  18. JSProgramIA

    Return Array from Function? How?

    This simple example does not work: function getProjectInfo($projectId){ global $row; // Retrieve info for supplied project ID // Returns $row $page_sql = "SELECT * from myTable"; $result = mysql_query($page_sql); $row = mysql_fetch_array($result); return $row; }...
  19. JSProgramIA

    Update Multiple Records , 1 Form

    terrific. exactly what i needed. thanks!
  20. JSProgramIA

    Update Multiple Records , 1 Form

    Thanks, I have gotten that far. Let's assume on each row there are appropriate field names, such as client[] , project[], etc. when i go to update ALL these records, how do I loop through each one? Just psuedocode is needed, nothing specific. For instance, I am sure it is something like...

Part and Inventory Search

Back
Top