Jump to content

fatkatie

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by fatkatie

  1. The public firewall suddenly started blocking access. Turn it off and site is available. So the fix will be to add a rule.
  2. I've been running an xampp apache distribution on a windows 10 box for a year. It's worked just fine. This morning no one could get to it. The site works on the host. Other boxes can ping the ip address. The service starts and stops without new errors ("server certificate does NOT include an ID which matches the server name" is an old friend). Any ideas before I reinstall it? I might just go out and hire a guy too.
  3. @#$@#$@! You spend all day on something that has nothing to do with anything. It was a stupid join. mb_check_encoding But, I would like to know if mb_check_encoding() is worth anything. I've relied on binding which has never failed me. Thank you.
  4. while ($pending || $row = $sth->fetch(PDO::FETCH_OBJ)) { $pending = false; $hn = $row->houseid; writeData("READ $hn", __FILE__, __LINE__); } There's the loop. houseid starts repeating. I found the record but I don't see anything wrong yet. Newlines? I'm going to rewrite the record with the check and see what that does.
  5. I just started populating a mysql table with data collected from a form posting. I do the dance ... $post_partnumber_source = html_entity_decode(trim(fvs($_POST['nsel_pnsrc'])));where fvs is function fvs($string){$string = filter_var($string, FILTER_SANITIZE_STRING); return $string; } And then I use PDO and binding. Something has happened. Something bad. My PHP $sth->fetch(PDO::FETCH_OBJ) loops are failing. All the records are not being read (some seem to be read twice)... and it happens around the record when form input was starting to be used. It's got to illegal data messing this up. So, my question is, what now? Will mb_check_encoding() solve this or am I missing something very basic. Thank you. mysql Ver 15.1 Distrib 10.1.37-MariaDB, for Win32 (AMD64), Using configuration as supplied by xampp
  6. I see the php functions for dealing with csv coded files, but is there a cvs handler for strings? Thanks.
  7. We have a site that was coded years ago and it does searching in database tables for any number of things. The mysql 'like' construct is commonly used. Years pass... Is there a search module that implements a more professional search? I would expect (with our configurations) things like spelling correction, user search history, zip code locating, suggestions (you may be interested in this) and so on. Even a simple one would be better than what we have now. I expect the implementation would not be trivial. The database contains products, addresses, product reviews, and new articles; among other things. Thanks for suggestions. Env: mysql, php 5 (not7), godaddy host (shared)
  8. The answer to that question is yes. https://github.com/jbrooksuk/MCAPI-PHP You must have a key, The key is $9.
  9. Brand new to mailchimp. I just have one question. Is it possible to compose and then send email programmatically? (php) (ok... 2 questions) And if so, can you point me to an example. I see other examples to adjust campaigns and lists, but I don't see any examples using mailchimp to distribute mail composed on a site. We tried to mail all our alerts from our account and you can guess what happened.
  10. Thank you for your comment.
  11. I want to alter a table and add a new column. I want to add a second email address column and I want the design of this new column to match with the first. For example, if email varchar(128) default null then I want the new column the "same" as in: email2 varchar(128) default null Can column design values be copied in this way within the sql construct? Can column design values be collected from another separate table?
  12. If there are no constraints on the database a read-back might be a good thing to do. . If for the count anyway.
  13. It's easy then to intercept those two then. I'll check the mysql output myself. Thanks for a very nice presentation. As for spelling, I can handle that too. 99% of the time it comes in a short feb.
  14. Without writing a regx, is there a php function/library that will take a string and try and convert it to a date? PHP's date is not adequate. For example, these are all "dates". I would expect it to succeed on any of these. On those that are ambiguous, there should be attribute that can be set like, expect year between 78 and 16. This is strictly best guess, I do not supply a format. Failure is expected. feb 21, 1999 Feburary 21, 1999 02/21/99 2/21/99 99/2/21 2-21-1999 19990221 sun, Feb 21, 1999 Sunday Feburary 21, 1999 anything returned by a mysql date (now(), datetime ...) Today's date is DATESTUFF You get the idea. Returns false on couldn't do it, and some array or seconds after N if successful. Thank you.
  15. Still new. Off topic - not really php? Hope not. Who else knows mysql like the php crowd. I find this clause construct in many places on this new site: and t2.keyword like concat('%', :bc11, '%') or t2.name like concat('%', :bc12, '%') or t2.des like concat('%', :bc13, '%') He's trying to find the search term anywhere in any of the 3 fields. bc11, bc12 and bc13 are binding 'keys' that receive identical values. Is there a way to build this something like this:? and any (t2.keyword, t2.name, t2.des) like concat('%', :bc11, '%') I had to make up something my self :-). Thanks.
  16. ?? - null coalescing operator - Thanks. Learn something every day.
  17. Thanks kicken. I thought it would, but I have an earlier php version and it does not. I wonder if could do a ... || int(0).
  18. It's being indexed by... (an assoc. array with keys A, B ....)
  19. I'm retrieving a number from an assoc array, indexed by [$overall]. The array is 'created' and used on the spot; assigned to no token. Just used and forgotten. Can I do this in php?
  20. Is it possible to do something like this? $pt_overall = array('A' => 5, 'B' => 4, 'C' => 3, 'D' => 2, 'E' => 1)[$overall] || 0; Thanks
  21. Ok, off we go. Get ready for the SVG questions. Thanks. Off to ddgo.
  22. I have a site that uses this to move a dial on a gauge image. It works some places (browsers/servers), and not others. (Call is contained within an older 3rd party module/program PHPDialGauge) How do you go about debugging something like this. The resource just 'disappears' on the call to imagerotate(). It acts more link eraseResource($needleImage). It's not a memory problem. Each server uses at least php 5.5. No 7's. The php doc site lists bugs and post wonder fixes. This proves difficult to deal with, so is there a module that deals with images and is worth installing and using? Is there another way? I feel like if I get this working now it's just sitting there waiting to crump. Thanks.
  23. Yah, I was thinking it was some kind of php idiom. Haven't been at this language long. Thanks both of you.
  24. if(trim($row->mysql_field == 0)) { Is that a valid construct? It reads obtain the field and compare to zero. The result is boolean; true or false. Then trim it? I can't figure out what the author really wants to do here. Thanks.
  25. Oh... I see. Sorry. I can be a little dense. So the base of a relative path inside an included file is the base of the file from which it is included. It is not the directory, necessarily, in which the file with the relative reference resides. I'm not sure, but I think this is treated different in other languages where the directory in which the file resides defines the base of a relative reference. I'll have to check that out. (It might be a processing order thing, where included files are processed first in their environment, thier directory, then 'included' into the master) That practically means that any relative reference can be bogus depending upon where the file is required or used. It sure means that buried includes with relative paths are a disaster. Big change in awareness here. Thanks.
×
×
  • 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.