Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Apparently not. You should make an admin interface for your blog.
  2. You realize that if you create a PHP powered website, that is a web app, right? If you already have a login page, you have a web app. A small one with limited functionality, but an application nonetheless.
  3. OP: Can you state in English what you are trying to do? Not what your existing code does, but what your end goal is? What data do you have, and what do you want to do with it?
  4. I think he's saying that no rows are being found, which is causing the error. The OP then ran the count query and it worked, so he thinks there are rows. In reality, the count is returning a count of 0.
  5. A web app is way more versatile than a phone app. Not to mention the OP is going to be much more likely to be successful at building a php app than an iOS AND Android app.
  6. http://lmgtfy.com/?q=mod_rewrite+pretty+urls First couple of links have the answer. Any of them. You need flags. BTW you don't want /uniqueID.php, you want /username for SEO purposes.
  7. That is the entire purpose of mod rewrite. Did you bother searching for it like I said?
  8. OMG. $value is an array. It doesn't matter how many times you print it, it will say Array. To see what's in an array you can use print_r().
  9. This is so the wrong way to do this sort of thing. You have ONE page that gets the ID from the URL. Google mod rewrite.
  10. Strings must be surrounded in quotes. Right now you're trying to compare two columns, not a column to a string. You also can fix your quotes. $query = "SELECT members.id, members.name FROM members WHERE members.name = '$personal_un_s'";
  11. Using the mysql datetime format is best.
  12. Do you get an error from mysql error? What output do you get? You will want to assign that SUM a name btw. SELECT SUM(wish_total) AS summed_wish_total FROM wish_list WHERE wish_product= '30108'
  13. You may need to have some processing that gets done to the variable every time, like checking it is the correct type.
  14. Wait, this is a recursive function, but you're not doing anything with the value it returns when you call it within itself. In the "middle" you have busLocation($all[$n['bus_location_id']], $all, $spacing); And you don't capture the value returned by it.
  15. the time() function returns the exact second, you're trying to compare the time at 12:00 am on that date to another time on that date. You probably need to do it like this: $chosen_start = strtotime("22-08-2012"); $chosen_end = strtotime("23-08-2012"]); $sql = $db->Query("SELECT * from `e_leads` WHERE `date` >= '{$chosen_start}' AND `date` < '{$chosen_end}'"); That will give you all of the matches that occured on 22-08-2012 You could have more luck storing the date as a mysql date or datetime format, and using the mysql functions.
  16. You'll need to return an array if you want more than one value.
  17. You're welcome. In the future before telling someone they've given you the wrong solution, try it out.
  18. I assume you mean columns? Because it doesn't matter how many rows it is, SUM adds them. If you mean columns, your example does not show different numbers of columns. Further more, given the test data, what I posted creates your desired output.
  19. SELECT job_id, date, SUM(a_hrs), SUM(b_hrs), SUM(c_hrs) FROM jobs GROUP BY job_id, date
  20. Reading the actual problem, wouldn't it make more sense to use something like soundex() to compare the search string and the searched field? Or search for each word, and the rows which have the most matches are at the top of the list. (So if it matches 3/4 words it is a good match)
  21. Are they stored as an INT or as a string with " hr" on the end?
  22. There is a user submitted function in the php manual that might do what you need: www.php.net/manual/en/function.shuffle.php#90615 I had a similar question recently: http://forums.phpfreaks.com/index.php?topic=363212.msg1718676#msg1718676 Check out Barand's answer, and the one in the php manual.
  23. No, I don't have to. You have to read it and attempt to learn. If you have a specific question ask it.
×
×
  • 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.