Jump to content

JAY6390

Members
  • Posts

    825
  • Joined

  • Last visited

Everything posted by JAY6390

  1. @katierosy - I did post that link in my first post
  2. You shouldn't need this $number . in the final row of code. Also, surely trying the code would show if it works or not
  3. My pagination class will do what you want, however you'll need to swap the procedural mysql functions into your db functions to get it to work via the $db object you've got
  4. Try this <?php echo KT_FormatForList(date('d/m/Y',strtotime($row_rsworksorders1['intraartapproval'])), 20); ?>
  5. You should look up "recursive functions" to understand what teamatomic has described
  6. This will fix your parse errors $con = mysql_connect("localhost", "XXXX", "XXXX"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("XXXX", $con); $count = mysql_query("SELECT LENGTH((stateLicenses) - LENGTH(REPLACE(stateLicenses, '|', '')) FROM profile WHERE statecount='empty'"); // only want to insert it into profile ID's that have "empty" (column initial value) $count++; echo $count; // just in for test to see if the above is working. mysql_query("UPDATE profile SET statecount='$count' WHERE statecount='empty'");
  7. echo "<b>Quantity:</b> <input type=\"text\" name=\"qtyBox\" value=\"1\" size=\"$qtyBox\" />";
  8. Very close, you need to change ONE of the following Either change mysql_fetch_array to mysql_fetch_object OR change $row->candidate_name to $row['candidate_name']
  9. Wow, OK well you need to query the database once, yet you have $query = mysql_query($sql) running twice for some reason You also don't have any line that fetches the rows of data from the query Finally you are trying to use the $sql string as an object. The $sql won't magically change into the query results I suggest you take a good read through a tutorial on this to grasp it a little easier http://www.w3schools.com/php/php_mysql_intro.asp is a good source for learning this
  10. Could be a number of things Have you put session_start() at the top of the file that's setting the session? What method are you using to extract the row data from mysql? Have you checked that the query isn't returning errors?
  11. use the user id instead, and simply echo out the id of the user, then when searching for the users info to manipulate, you just use the id in your query to find it
  12. convert them to unix timestamps and compare them
  13. $types[] = (isset($_GET['jobtype']) && strlen(trim($_GET['jobtype'])) > 0) ? "`jobtype` LIKE '%" . mysql_real_escape_string(trim($_GET['jobtype'])) . "%'" : ''; or $types[] = (isset($_GET['jobtype']) && strlen(trim($_GET['jobtype'])) > 0) ? "`jobtype` = '" . mysql_real_escape_string(trim($_GET['jobtype'])) . "'" : ''; should work
  14. Oops try this $types[] = (isset($_GET['jobtype']) && strlen(trim($_GET['jobtype'])) > 0) ? "`jobtype` = '%" . mysql_real_escape_string(trim($_GET['jobtype'])) . "%'" : '';
  15. Try that http://www.hawkee.com/snippet/1800/ If that doesn't do it, take a look at some other google results http://www.google.com/search?q=category+tree+php+mysql+recursive
  16. under $types[] = isset($_GET['location'])?"`location` LIKE '%{$searchTermDB}%'":''; put $types[] = isset($_GET['jobtype'] && strlen(trim($_GET['jobtype'])) > 0)?"`jobtype` = '%".mysql_real_escape_string(trim($_GET['jobtype']))."%'":'';
  17. Change all links so that their target is set to _parent
  18. @TK - Yes JavaScript is REQUIRED for AJAX, that's what the J stands for in AJAX (Asynchronous JavaScript and XML)
  19. Load the file into memory, then use a regular expression to find the username and that particular line, then replace the contents using preg_replace() or preg_replace_callback() and save it back again This would be achieved a lot easier and more reliably with MySQL however
  20. I would recommend using a pre-built script that already does this http://www.google.com/search?q=multi+image+upload+script+php There's plenty of them out there you could use, and there's far too much code to read through above
  21. Short of writing your own codec it's unlikely you'll be able to do this. There may be an extension for php, but it's unlikely to be activated by default
  22. zipping them would make more sense to be honest. You could make a java applet to do it like facebook does but unless you know how to I would recommend the zipping method
  23. Not really sure how to answer this other than no it will not work. You'll just have to dynamically set a bit of CSS in your page, or use an AJAX call to load the BG choice and set it when the page loads
  24. This should be what you need http://uk.php.net/manual/en/function.array-count-values.php
×
×
  • 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.