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 gkittelson 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. mcmon999

    Expand option to display further query details

    Hi, I have a php script which calls messages from a database but I'd like to allow people to make a comments on the messages and view old comments by selecting a button which will expand to show all the comments made on a specific message: Code to retrieve messages...
  2. mcmon999

    Running PHP Script with Cronjob

    Hi, I'm attempting to run a PHP script using a Cron job, which imports a csv file into a mysql database. I initially scheduled them to run within crontab but they were never performed. I've tested to ensure PHP is set up correctly and that cron is really running. When I've attempted to run...
  3. mcmon999

    Escape apostrophe when importing into MySQL

    Excellent...thank very much for your help on this jpadie!! James
  4. mcmon999

    Escape apostrophe when importing into MySQL

    Hi, Thanks for you feedback. I'm testing this now but when importing the file, it seems to insert the correct about of records but all records are empty. Am i missing anything that's preventing the variables from being populated? $filename='2009-09-14.txt'; $handle = fopen($filename...
  5. mcmon999

    Escape apostrophe when importing into MySQL

    Hi, Thanks very much for your help. I've attempted to use: array_map('mysql_real_escape_string', $data); It's completes the import of data but the 6 fields that have an apostrophe are still dropped? I included the code within the while loop: $filename='2009-09-14.txt'; $handle =...
  6. mcmon999

    Escape apostrophe when importing into MySQL

    Hi, I'm trying to import a CSV (tab) delimited file into a MySQL database, however it error's when importing fields with an apostrophe. I'm importing the data using the fgetcsv function: $filename='http://www.test.co.uk/2009-09-14.txt'; $handle = fopen("$filename", "r"); while...
  7. mcmon999

    Parse XML file into MySQL Db - Db error message handling

    Brilliant, thanks very much for your help!!
  8. mcmon999

    Parse XML file into MySQL Db - Db error message handling

    Excellent thanks jpadie, this worked perfectly. It now outputs all the query errors, the majority of them being for illegal characters or where the data has been encoded for XML. Such as: ' But fails when importing these into the database. Is there a small way to remove or encoded...
  9. mcmon999

    Parse XML file into MySQL Db - Db error message handling

    Hi all, I'm attempting to parse an XML file into a MySQL database using simpleXML but keep encountering the error "Duplicate entry '203581' for key 'PRIMARY'" Is it possible to skip these transactions? so the error does not occur. Would it potentially be possible to do a IF statement and...
  10. mcmon999

    Selecting the most recent records added to a table

    Excellent thanks very much! Do you know why this happens?
  11. mcmon999

    Selecting the most recent records added to a table

    I'm trying to select the most recent records added to a table. I have three tables (User, user_training, training) user_trainging is resolving the many to many relationship and the table i am querying. When i run a normal query grouping by the training ID, it selects the first record inserted...
  12. mcmon999

    Concat Variables to build URL

    Hi, I apologise in advance but i'm very new to this. I'm trying to join three variables to build a URL: <html> <head> <script type="text/javascript"> var a = 'http://www.testing.com?'; var b = '%PRODUCT_FIELD(MovieURL,1)%'; var c = '&test'; function url(a, b, c) { url = a+b+c return url }...
  13. mcmon999

    Validation

    Ha oh yeah, i wasn't thinking about that. I basically just want to check that field for illegal characters and that was the only piece of code the would work. do you know the function to allow letters, numbers only? I really appreciate your help on this.
  14. mcmon999

    Validation

    Hi, I'm using an example of some validation i found on the internet but it does not allow me to submit Spaces between words. E.g i can submit "this_is_a_test" but can not insert "This is a test" CODE: <!-- function validateFormOnSubmit(theForm) { var reason = ""; reason +=...
  15. mcmon999

    Dynamic dropdown menus

    Hi, I have a form which contains three dropdown menus. The second is dependant on the first dropdown but i can get it to automatically reload the second menu without me having to pressing the submit button: <form name="program_search" action="task_management.php" method="get" > </p> <table...
  16. mcmon999

    Changing Background Colour dependant on date

    Hi, i've created a php frontend, that displays a table of data which contains tasks and dates, i need to change the background colour of the cells dependant on how old the tasks are. Does anyone know how i should do this or of any threads that would be useful? Thanks in advance.
  17. mcmon999

    Using Variable to create view

    Hi, I'm trying to create a view using a variable entered by the using, i started by using the code below: <?php $programid = $_GET['prog_id']; //echo "$programid"; $period = $_GET['period']; //echo "$period"; $query=mysql_query("drop view IF EXISTS...
  18. mcmon999

    Date Problem

    thanks for responding, i've now got the problem where if 1 is selected for the month it will insert 00 and 2 will insert 01. the range for month is 1, 12 any ideas why this is occuring?? for code see first post.
  19. mcmon999

    Date Problem

    Hi, i have some code that allows the using to input the date. how do i join the day, month and year so it can be reversed into MySQL date format? is this the easiest way to create a date drop down? Code: <tr> <td>Shift Date</td> <td><div align="left"> <?php $months =...
  20. mcmon999

    Update problem

    Hi, thanks for replying! the forms begins like: <form name="Assign_job" action="update_job.php" method="GET"> Should i be declaring the mysql_query or doing something else with it?? sorry i'm new at this!!

Part and Inventory Search

Back
Top