Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/24/2022 in all areas

  1. If the field is a date then it should be a date. Don't make it a string. But what I was trying to point out was that you were asking MySQL to interpret the timestamp 2022-01-22T20:52:00.000Z according to the format %c-%e-%Y %T, or in other words M-D-YYYY HH:MM:SS. That's not going to work.
    1 point
  2. At the same time look into using PDO instead of MYSQLI. Much easier to use. Here is a brief example: $pdo = (connection statement); // do this ONCE before beginning db operations $q = 'select col1, col2, col3 from mytable where col1 = :arg1'; $qst = $pdo->prepare($q); // define the parms $parms = array( ':arg1'=>$val1 ); if (!$qst->execute($parms)) { (handle an error condition) } else { while($row = $qst->fetch()) { (handle each row of the results) } } There is very good info on setting up the connection logic in the manual as well as all of the available functions but what I have showed you is enough to do most exercises.
    1 point
  3. Programming is not like cooking, where you can throw a bunch of things into a pot and get a delicious gumbo. Programming is like painting: the canvas may vary and what you're trying to draw will be different each day, but you need to work with the paints in a certain way, and if you try to throw them together then all you're going to be able to paint is "Brown Rock In Puddle of Mud". If you want red then you use red, and if you want yellow then you use yellow, and if you want some shade of orange then you mix red and yellow together in very precise, calculated, and controlled proportions. You've got a lot of things going on here and only a small fraction of them are going to be appropriate, let alone useful, to your end goal. It's complicated enough that I'm not even entirely sure what your end goal is supposed to be (other than "you want a red dot"). So let's start at the beginning - or perhaps a little bit on this side of it. You have a database, but let's pretend you already got what you need from it and now have that $b64 variable. In as technical terms as you know, what do you need to do with it? Do you need to output an <img> into your HTML that will show this image? Or do you already have the <img> and you need a script that you can reference to show the image? And I'll skip ahead a bit and ask: in the general case, are these images going to be small and simple, or potentially large and detailed? Judging by the fact that you're talking about JPEGs that are 5"x5", I'm thinking the latter. We'll come back to that later.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.