Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Problem with retrieving results from MySQL query
Jessica replied to gettingherdone's topic in PHP Coding Help
So why did you put two of them?? -
Problem with retrieving results from MySQL query
Jessica replied to gettingherdone's topic in PHP Coding Help
Maybe it's the fever, I can't follow the logic. -
Get the count of the rows which are not active. If its zero, run the command to update them all active.
- 12 replies
-
Problem with retrieving results from MySQL query
Jessica replied to gettingherdone's topic in PHP Coding Help
You need to check for errors after you query. See my signature. Why do you have !! in your function there? Edit: I see your second set of code. What does the query look like when you echo it? Echo the query string, not the result object. -
Yes, it's possible. Use COUNT()
- 12 replies
-
Probably best to use an array, but you could also return the string you plan on echoing.
-
Did you change $array to your actual array?
-
No, return the values.
-
You haven't really given us enough information to help you.
-
Oh I just noticed you have all that in a function. You have a variable scope issue. If you're not returning the variables from the function you can't use them.
-
And what did it show when you changed <div id="container"> <h1>Recipe: <?php echo $recipe_title . ' by ' . $recipe_brewer; ?></h1> </div> to <div id="container"> <?php var_dump($recipe_title); ?> </div> ?? What code is between these two snips?
-
Turn on error reporting, and post the actual output - ie, does it say Recipe by two times??
-
Well one says "It runs on most Unix systems (including Mac OS X) which have Perl, DBI, and Term::ReadKey installed." So...
-
By tutorial you mean homework, right?
-
I'm not great at regex, I just wanted to say don't put an upper limit on passwords. I use several that are way longer than 32.
-
If it's an HTML form, that is default functionality.
-
Don't take this the wrong way but do you understand how PHP works? Every page load, unless you've stored information in the session, that information has to be selected from the database again. Simply changing the value right before it's displayed on one page would not affect the other pages. You said you're using something that is supposed to support "multi vendor shipping" - you shouldn't have to be touching the code at all.
-
Then you'll want to find the code which generates that array. Otherwise you will indeed have to change it on every page that accesses that array, as you've already discovered.
-
The vendor id for a specific product ought to be stored in a database. Not changed in the code.
-
Is that really not stored in a database?
-
Hmmm now I'm wondering what it was that I couldn't use JS for that one time.... *wanders off*
-
My bad, I was thinking of the # part I think? Who knows.
-
Why don't you try it out and see? Put it in a loop and go through a bunch of scenarios.
-
Without a date, how do you know if its 1 am the next day or 1 am three days later?
-
You've been given all the clues you need to solve it. Why don't you try to write the function using that help and if you're still stuck, post back with your code and the problem.