12-31-2016, 02:38 PM
Ahhhhh! It was the $db-> thing! Thank yewwww!
The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Running Update Query
|
12-31-2016, 02:38 PM
Ahhhhh! It was the $db-> thing! Thank yewwww!
01-03-2017, 04:10 PM
Here's another one to make me sound stupider I have a page that needs to change values in 3 tables when I press update. It changes the
Code: dates Code: calls Code: orders Code: $date Code: $isactivate is undefined errors Code: isactivate Code: dates https://hastebin.com/wuvahisigu.php
01-03-2017, 10:34 PM
The isactive error is coming because you have that variable in your function, but you are not getting that info from anywhere. I'm guessing you mean status.
What is the isactivate column supposed to have on it? Is it supposed to be a 1 or 0, yes or no? What data are you trying to get in there?
01-04-2017, 12:08 AM
Mudmin,
Note my mispellings of Code: isactivate Code: isactive Code: isactive Code: isactive Code: ddfunction.php https://hastebin.com/asopijopoj.xml The Code: isactive Code: dates Code: orders Code: calls Code: isactive Thanks for your help.
01-04-2017, 02:08 AM
Let's take a crack at this. I'm going to guess that your procedural mysqli calls are right in your page itself, although I'm a bit rusty on that. I made a few changes to protect you against sql injections (hacks) on your $_GET variables.
If this isn't it, it's pretty close...here is your function... https://hastebin.com/zajidawoqu.xml Here is your full page https://hastebin.com/zupudufuvo.xml If you are still having problems, this is what I would check. 1. Echo your date and make sure it's in the same format as the one in the database. 2. Double check your column and table names 3. Before line 57, I would do Code: die($date); Code: die($isactive);
01-04-2017, 02:21 AM
You sir, work wonders. I'm trying to get everything switched to PDO and injection proof but between coding new plugins for this system and work itself, it's hard to take the time! And I honestly cannot find a reason that it would be beneficial (other than the obvious) since I am currently the only one using the system. Prior to it being deployed to the entire team of more than 100 users, I'll definitely have to have it converted! Just not really a need right now. Mind you, it would probably make it easier in the long run so I don't have to manually do it later lol. Decisions, decisions! Thanks again Mudmin!
01-04-2017, 02:22 AM
haha. I get that. I'm going to work on putting out a video on the db class. I think it would be super helpful on this sort of stuff. Glad to help!
01-04-2017, 02:24 AM
That would be awesome! I think that's my biggest struggle, is learning how this system inserts, updates and queries the database. Although I can kind of grasp it by looking at the functions that are currently in the system, it is hard for me to fully understand how to adapt it to work with my new functions. Once I get told though, I understand! Lessons learned lol!
02-14-2017, 01:52 PM
I just posted a 35 minute video detailing how to use the database class.
https://www.youtube.com/watch?v=rb0kD5tC...e=youtu.be
03-17-2017, 04:55 PM
I just got around to watching this, and THANK YOU! That was hands down the most informative video I've watched when it has come to coding! Thanks again!
|