Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
What did the error say?
-
enable and disable row in mysql table using a html button
Jessica replied to hance2105's topic in PHP Coding Help
Programming is not copying and pasting other people's "codes". -
Web service to generate thumbnail previews online
Jessica replied to ThumbifyMe's topic in Beta Test Your Stuff!
Moved to the appropriate forum. -
Why? Why don't you just leave it as is...? Save those two arrays in a file and then include them.
-
Yes, those are two different things.
-
Do not bump your posts. The quote pretty much explains it as far as what you need to know to use it. For more information see the PHP manual. http://us2.php.net/manual/en/language.types.resource.php
-
You should be using prepared statements in mysqli, NOT escape string.
-
You probably have a typo somewhere. Using strict error reporting and/or a good IDE like NetBeans will help catch it.
-
If you'd explained some of this up front it would have gone a lot faster. It probably has to do with the configuration of your relationships, which you haven't shown. I suggest you read the links in my signature on how to get help. David: counterCache is supposed to handle that count automatically - hence why it's trying to update the userCount automatically when the users table is updated. It's a tool for CakePHP.
-
Not if you're using mysql_ functions, you're not.
-
That makes even less sense. An address has multiple users???
-
Deleting XML entries after certain amount of time
Jessica replied to Texan78's topic in PHP Coding Help
Edit: Do the remove command within the loop. Not at the end. -
Why would you bother with three lines of code though? That's the same as just doing: echo $structure[0]['cards'][0]['info']['city']['title'] Or: echo $structure[0]['cards'][0]['info'][$somekey][$someotherkey]
-
That makes no sense. When you delete a user, why would you attempt to update their Address count? You should call that when you delete an ADDRESS, not a user.
-
You shouldn't even be using it anymore. New code should be using mysqli/PDO.
-
http://www.phpfreaks.com/page/rules-and-terms-of-service Read the link in my signature on Debugging your SQL. Research using prepared statements.
-
Best practice is to use an auto-incrementing id as your primary key, even if you think usernames will never change. OP: You haven't posted a question or a problem or any code. You've just posted what you want to happen. Cool story.
-
How should we be able to help? You've posted no code. You also said it was an UPDATE before, now it's a DELETE? If you don't even know what your code is doing, how should we?
-
Which is it? You want just the count, or you want all the rows?
-
Probably.
-
Yes. Properly normalize your data, then you can use COUNT() and GROUP BY to get it all in one query.
-
OP: If you always are going to use the first card, is there a reason you have it in an array called 'cards'? Why not just one card?
-
Unless you made your personal computer accessible over the internet, there's no reason to change your local setup.
-
Use an OR clause between those two. WHERE name ... AND (sms .. OR email .. )