Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
What is a query? What is an array? What does $_POST hold? These are all things you need to know the answer to. If you don't, get on it. | | | V
-
Try using DATEDIFF
-
Echo the query before running it, what is it?
-
Can you post a dump of the data?
-
Basic debugging - is it need_delete or needs_delete?
-
refresh page only once each time visited
Jessica replied to raptor30506090's topic in Javascript Help
You're doing it wrong. -
What is a spry? What code are you using to do the tabs? There are plenty of plugins for libraries like jQuery that do exactly what you're describing.
-
INNER JOIN `bg_points` ON `bg_roster`.uid=`bg_points`.uid THIS one needs to be a LEFT join. You said one row has no matching points value.
-
I think for a one time update like this, you'll need to use PHP to parse the existing data and generate the new inserts.
-
CSS isn't displaying after unload for 10-15 minutes
Jessica replied to floridaflatlander's topic in CSS Help
CSS is always cached, if you need to change it often for development, add the timestamp after it using PHP. echo "css_file.css?".time(); -
need help ? else please take a look : thank you
Jessica replied to cybernet's topic in PHP Coding Help
It's called the ternary operator. Was that the only question? If not, you need to post more details other than "I'm stuck". -
I can only assume you're doing an ajax powered search?
-
Then I suggest a basic PHP tutorial.
-
I like smashing magazine, but for some reason haven't been getting the feed lately, I'll have to check that one.
-
I swear to god this is what some of my coworkers do. They all have something else in common too. I should find out what editor they use. I spent 30 minutes once cleaning up some indenting (yes, I know a real IDE can do it for me, shut up.)
-
This topic has been moved to MySQL Help. http://forums.phpfreaks.com/index.php?topic=364982.0
-
That was kind of bossy... I use Spotify, and I have several lists/stations I like to listen to when programming. The first is anything pop repetitive. The stuff that plays on Billboard 100 right now, it all has 4 lyrics over and over again. Very easy to focus for me. Other than that I like my workout station with songs geared to running or lifting weights, or my high-school list which is 90's pop basically (Mostly BNL and Everclear, because I haven't had time to add much more to it. I could listen to BNL all day long.)
-
Please post your syntax errors, and use the code tags. If you're using an editor with syntax highlighting, some of your errors are obvious. See below. <?php $animation ="http://very-soft.com/media/products/screenshots/Energy_animation-site_1.gif; // link to the file $gifDecoder = new GIFDecoder ( fread ( fopen ( $animation, "rb" ), filesize ($animation) ) ); $delay = $gifDecoder->GIFGetDelays ( ); // get the delay between each frame // treatment of the reduced images 225x127 $i = 1; foreach ( $gifDecoder -> GIFGetFrames ( ) as $frame ) { fwrite ( fopen ( "C:\Documents and Settings\student.ISL-CPU-25\My Documents\resizegif\tmp_reduced" , "wb" ), $frame ); // write each frame in a temporary file $img = "C:\Documents and Settings\student.ISL-CPU-25\My Documents\resizegif\tmp_reduced\Energy$i.gif"; // File image location $newfilename = "C:\Documents and Settings\student.ISL-CPU-25\My Documents\resizegif\tmp_reduced\Energy2$i.gif"; // New file name $w = 225; // new width $h = 127; // new height resize($img, $w, $h, $newfilename); // function to reduce the image $i++; ?>
-
Shuffling a deck of cards in as few queries as possible
Jessica replied to Jessica's topic in MySQL Help
How is that different than what I'm doing? Except that it could cause two cards to be at the same spot? -
Shuffling a deck of cards in as few queries as possible
Jessica replied to Jessica's topic in MySQL Help
Thanks, I double checked and I am already using innodb. -
Shuffling a deck of cards in as few queries as possible
Jessica replied to Jessica's topic in MySQL Help
I was on my phone for that, decided it was too much work to keep typing on there Anyway I think maybe the table structure wasn't clear, and the point of the game. it's sort of a mini-game within the game, and it's not something users can just quit the mini-game and start over, if they leave, when they come back their deck needs to be in the order they left it, so I feel like I need to store the state of their deck. Each player can have 0-many of any given card, and buy/sell cards (when they are NOT playing the mini game). The shuffle happens automatically when they are playing the mini game and the count of cards that have a deck_spot is < 4. Tables: sail_cards: sail_card_id, title, card_text, action, rarity, sail_card_type_id user_sail_cards: user_sail_card_id, user_id, sail_card_id, deck_spot If you guys still think I am going about it completely wrong with the new info, then I guess I am confused about how to do it at all I will look into Redis. -
Shuffling a deck of cards in as few queries as possible
Jessica replied to Jessica's topic in MySQL Help
To add more infomation, each player has their own deck of cards. They are playing against a computer, not another player, so they can leave an come back to their same game at any time. Why is the spot in the deck not related to the User_card? There's a cards table which holds all cards, then a user_cards which holds user id, card id and deck spot. What is wrong about that? They don't all have the same cards and can have multiples of a card. If I don't store the new order in the db, how do I prevent someone from simply restarting until they get a shuffle they like? User should have about 50 or more cards so the shuffle will happen for each user after they have played 50 cards. -
Shuffling a deck of cards in as few queries as possible
Jessica replied to Jessica's topic in MySQL Help
Looks like I need to learn how to use procedures then