Posts by timmylogue

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Maybe someone can help me out.

When the user switches the case statement (via button) and then exits out of the web browser – I would like it to go back to the last case statement they choose when they go back in. Can this happen?

Thanks :D

var sideshowLoader:Loader = new Loader();
addChild(sideshowLoader);

function clickHandler(e:Event):void
{
    switch (e.target.name)
    {

            // button 1
            case "button1" :
            sideshowLoader.load(new URLRequest("slideshow1?"+Math.random()));
            break;

            // button 2
            case "button2" :
            sideshowLoader.load(new URLRequest("slideshow2.swf?"+Math.random()));
            break;
    }
}
321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Glad your sorted, I wasnt being fa-see-shus ( can never spell it ) , but the amount of times I run the query before connection, I need punching

haha oh, I know. I do it all the time.

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Here you go, this is the full code that I will use
<?php
// configuration
$dbtype        = "mysql";
$dbhost        = "localhost";
$dbname        = "something";
$dbuser        = "root";
$dbpass        = "mysql";

// database connection
...........

Cool, thanks again!

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

are you first connecting to your database ?

Yup! of course :)

I got it working now! Thanks guys, you rock!

$sql = "SELECT * FROM albums WHERE id = 21 LIMIT 0, 30 ";

$something= mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_assoc($something)) {
echo $row['id'];
}
321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

SELECT * FROM something WHERE id = 21
Fiddle http://sqlfiddle.com/#!2/3006ee/1

Hey, thanks for the speedy reply! I see how that was done… but I’m looking for a way to do this in php to echo is out.

If I do something like this:

$sql = "SELECT * FROM albums WHERE id = 21 LIMIT 0, 30 ";
echo $sql;

Would that make sense? Doesn’t seem to be working though…

Thanks again!

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

So, i’m creating a login membership. When the user logs in, they have an unique ID that was placed in a MYSQL table from when they registered.

For example, one user has an ID of 21 and at the moment they have 3 rows with the ID 21.

My question is:
How to I get those rows and only those rows to display them in php for each unique ID (user) depending on how many they have? So, for this example, it would display the number “21” three times….

Thanks
Timothy

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Hey dtbaker,
Do you mind helping me out one last time? I’ve been trying to figure it out but no luck.

I’m trying to do the same but inside each directories like “tim” and “scott”, there is another directory called “photos”. All directories have this, but only some contain files (like .jpgs) inside the “photos” directory and some don’t.

I want to display the directories that have any type of file inside the “photos” directory.

I was messing around with it:

$directories_to_display = array();
foreach(glob('users/*') as $directory){
  if(is_dir($directory) && file_exists($directory . '/photos/' )){
     $directories_to_display[] = $directory;
  }
}

Thanks!

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Thanks dtbaker! Worked!

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Hey guys,

I’m trying to figure out (with php) how to list directory names that only have the file named “profile.png” inside.

So.. I have about 30 directories inside one main directory called “users”.

Inside the “users” directory, there are other directories like:

  • users/tim
  • users/bob
  • users/scott
  • users/john

  • Only a few of those directories (like tim, scott and john) carry the file named “profile.png”. I would like to display those directories just on a page. Thats it.

    Any help would be appreciated!

    - Tim

    321 posts
    • Has been part of the Envato Community for over 7 years
    • Has collected 100+ items on Envato Market
    • Located in United States
    timmylogue says

    Nevermind! I got it!

    myDescription_txt.y += Math.round((myDescription_txt.height - myDescription_txt.textHeight));
    
    by
    by
    by
    by
    by
    by