Jump to content

bluesoul

Members
  • Posts

    149
  • Joined

  • Last visited

Everything posted by bluesoul

  1. http://www.google.com/search?q=query+analyzer Hard to know without seeing your database so download an analyzer and see what works best for you.
  2. Yup, that makes sense, it was set to match, then the second if statement executed, which failed and so went to the else. Thanks.
  3. /blink I should stop coding when hungry. That's weird, though. I didn't expect an elseif to be the cause. Live and learn I suppose.
  4. $exp_date[$k] = date('Y-m-d',strtotime($exp_date[$k])); $whois_exp_date[$k] = date('Y-m-d',strtotime($whois_exp_date[$k])); Both results in this instance are 2009-08-02 yet when I run... if ($exp_date[$k] == $whois_exp_date[$k]) { $sort[$k] = "match"; } if ($exp_date[$k] != $whois_exp_date[$k]) { $sort[$k] = "nomatch"; } else { $sort[$k] = "error"; } echo $sort[$k]; // error
  5. Just make sure that the action the form's going to will know what to do with this change. If the submitted form is expecting California but gets CA...see where I'm going with this? Just as long as everything else is set right it shouldn't be a problem.
  6. In english, it's checking data that was already submitted for the existance of a variable named $_POST['state'], which is the isset() bit. Then, if that variable is set, it wants to compare the value of it against a string that we provide. That && is a logical AND operator, meaning that both conditions have to be true for the conditional to be run. So if there's a set variable named $_POST['state'], AND the value of that variable is "California", THEN the phrase " selected" is added, typically to an <option> tag. Changing it to a two letter abbreviation would simply involve changing all relevant references of California to CA and likely repeating this process with the other states.
  7. And I'm gonna go out on a limb and say that's not the most efficient way of doing it, especially when some combination of PHP settings and string-escaping functions will do what you want it to do.
  8. You shouldn't need multiple ' unless you're using a Sybase-style DB like SQL Server. The second query looks right to me unless I'm missing something?
  9. I didn't think of using a session var, can't hurt, I'll give it a shot. Thanks for helping me reason through this one.
  10. Uh, that would make the problem that there is no field named touser which we're looking for in these scripts. ;\
  11. $server is not being defined, hence the :43. Right, which makes the logical question WHY is it not being defined when the switch uses the default case which assigns it a $server. It's gotta be a scope problem but I just don't see where.
  12. It would go in diagnoses. Each row is a separate diagnosis but will be joined to a patient via that patient_id key.
  13. You have to wrap the variable in double quotes, single quotes on an echo means not to display the contents of a variable. $num = 5; echo("$num"); // 5 echo('$num'); // $num
  14. I would wager that code will echo both Deleted and Failed without a conditional in there somewhere.
  15. What I would do then, is view the source of the rendered page, look for the menu code, and then search your site for that same bit of code. Dreamweaver can search an entire site's worth of text and if you find a unique enough line you can even do it in Windows Search.
  16. Without looking at the normalization you would just need to keep your patients in one table, and your diagnoses in the other, and you join the two on a field called patient_id. This field would be an auto-incremented number in the patient table. That would be a start anyway.
  17. The arguments for explode are explode ( string $delimiter , string $string [, int $limit ] ) so you can do... $x = explode("-",$var,2); echo trim($x[1]); And get the result you're wanting
  18. Seems like... $query = "SELECT COUNT(*) FROM messages WHERE unread = 'unread' and touser = '$session->username'"); would work?
  19. Aye, posting some code would help us do more than make guesses. Typically a menu bar would indicate a table so it may be wrapped in <tr> tags but that's speculation at best.
  20. The problem is that's going to be valid SQL even if 0 rows are affected so the die is doing what it's supposed to do. Why not check for the existence of the file prior to running the query?
  21. Almost no time as PHP is rooted in C. If you have a grasp of C before taking PHP on it is a major help. Knowledge of C++ would also be recommended so you can use classes to their full potential. Your main difference will be taking advantage of all the new premade functions that PHP provides.
  22. It wasn't an endorsement so much as a possible explanation as to why things may be not working. You can use this to turn it off. ini_set(magic_quotes_gpc, 0);
  23. As a note, there's not a terribly easy way to do it in MSSQL as there's not a LIMIT function in the usual sense. You have to use two TOP statements. Google had a good article on how to do it.
  24. If it's not working it's possible you have gpc_magic_quotes enabled in your php.ini which takes care of this for you.
  25. Anyone? I've shelved it for right now but I'd like to get it finished.
×
×
  • 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.