Authentic voices. Remarkable stories. AOL On Originals showcase the passions that make the world a more interesting place.
James Franco loves movies. He loves watching them, acting in them, directing them, and even writing them. And now, he’s going to take some of his favorite movie scenes from the most famous films of all time, and re-imagine them in ways that only James can.
Go behind the scenes with some of the biggest digital celebrities to see what life is like when the blogging and tweeting stops.
The story of punk rock singer Laura Jane Grace of Against Me! who came out as a woman in 2012, and other members of the trans community whose experiences are woefully underrepresented and misunderstood in the media.
Documentary shorts conceived of and directed by famous actors. Jeff Garlin, Katie Holmes, Alia Shawkat, Judy Greer, and James Purefoy
Park Bench is a new kind of "talking show" straight from the mind of born and bred New Yorker and host, Steve Buscemi.
Digital influencer Justine Ezarik (iJustine) is back. After covering the world of wearable tech last season, iJustine is expanding her coverage this year by profiling the hottest tech trends across the country.
A 12 episode documentary series following 5 startup companies competing in the 2013 San Francisco TechCrunch Disrupt Startup Battlefield as they fine tune their products and eventually present in front of a panel of judges in hopes of winning $50,000 in funding.
Enter the graceful but competitive world of ballet through the eyes of executive producer, Sarah Jessica Parker. This behind-the-scenes docudrama reveals what it takes to perform on the ultimate stage, the New York City Ballet. Catch NYCB on stage at Lincoln Center.
Nicole Richie brings her unfiltered sense of humor and unique perspective to life in a new series based on her irreverent twitter feed. The show follows the outspoken celebrity as she shares her perspective on style, parenting, relationships and her journey to adulthood.
Explore what it means to be human as we rush head first into the future through the eyes, creativity, and mind of Tiffany Shlain, acclaimed filmmaker and speaker, founder of The Webby Awards, mother, constant pusher of boundaries and one of Newsweek’s “women shaping the 21st Century.”
Gwyneth Paltrow and Tracy Anderson spend time with women who've overcome hardship, injury, and setbacks to triumph in the face of adversity.
Hank Azaria’s touching, humorous, and often enlightening journey from a man who is not even sure he wants to have kids, to a father going through the joys, trials and tribulations of being a dad.
PHP tutorial, this video will show a tutorial on How to Use SQL SELECT FROM with PHP - Part 2 of 2.
Tags:"SQL SELECT FROM" with PHP - Part 2 of 2,computer tutorials,internet codes,masterjake777,php,php codes,php help,php tutorials,software tutorials,sql select from with php,writing software
Grab video code:
—it’s—it can be random but at one point there might be an eight in here somewhere. So you actually do need to give it an order if you want it to appear in a certain order. To do that, right at the end, after you’ve done the queries, the string and you’ve tested all your values and you have it already, you need to add orderby, put the field name you want to order it by here and by it takes, we’re going to do id and then you want to put asc or desc. Asc is ascending, that means it will do one, two, three, four and go up. Desc is descending. Let’s just put that there for now and click it. You’ll notice now it’s numbered four, three, two, one. It’s going backwards. Once again, this may seem a little bit confusing and I'm sorry but you just got to give this some time to sink in. You might want to pull out some Google articles on php and learn about this from there as well. But I’ll go ahead and go over what this is doing again now.
I've connected to our database and select—or connect to the mysql and select your database, test_db. Here we’re setting a mysql query to the value of the query because you can assign a mysql query to a variable. In the query we’re selecting everything from the table temp data and ordering it by the id descending, which—this is the id it’s a number, so descending is four, three, two, one. So that’s the query string.
Now what's new here is we’re using our y loop and to test to what—to see what is true, we’re assigning the variable row to a function called mysql fetch assoc, which is basically fetching an associative array for whatever we put in here. And we put the query in here which is this mysql query. So it’s fetching an array to get each row from the table and assign that to the variable row. And it’s going to go one at a time so y row is equal to that, it’s going to reset the variable each time with the new information. Then we’re echoing out the values id and number from the table. And doing that, we’re just typing variable name which is row and then we’re putting brackets which is arrays and I’ll get into that in several videos. Actually I might release the erase video first, even if I recorded this one before that. But anyway, brackets, and then we’re putting quotes around it because it’s a field name and we have to have it in quotes, not back takes this time because back takes are only used in your query for the table names and field names but in regular arrays, you need to use regular quotes. And so row id is that row id, it’s going to get whatever values in there and they're caught out on the screen.
It’s basically what we’re doing, it’s as simple as that. I don’t know how simple that is seeming to you right now but there’s not really much more I can say, it’s just something you have to get used to overtime and you will start to get better at it and you just have to give it some time. Now since we are on this—they erased this video and I have already surpassed the 10-minute limit, meaning I'm going to be going into two parts, I'm going to go ahead and show you one other thing you can do on the end of a mysql query. This goes after you do any ordering or where. And actually I'm going to cover the where in just a second.
After you’ve ordered it or whatever, you don’t have to do any of this, it’s not at all required. You don’t have to have that in there but you do have to have a certain rise in a certain order after the ordering part or the way or part where you select it, if you want to eliminate, you can. Eliminating is just saying, that only shows so many results. You type the keyword limit in caps and you put how many results you want to show. So we type two, it’s going to limit it to two results. So it’s just going to show four and three, I’ll refresh the page, you’ll see that. Because it’s ordering it descending so it’s starting four, three, two, one and it’s limiting it to two results. So this is just going to take the top two and stop. You can also limit it to a value—I won’t get into that right now, it’s kind of confusing. So yeah, we won’t get into that.
But now let’s go ahead and go over the where part because you can select and—let’s say you only want to select values where the number is 80, so you don’t want this 14 in there, you just want all the 80s. Then you would do this, select all from temp data, where number=80. See that right there? Numbers in back ticks of course because it’s filming, equals then 80 and single quotes because it’s a value. Save that and reload this. Now you're going to see four, two and one, still ordered descending because we left that on there and it’s showing just the 80s now. There is no 14 in there. And as you can see there’s a 14 right here but it’s selecting everything from the table temp data, where the number is equal to 80. And you can do other things in here, it’s just comparison operators, you can do less than or equal to, whatever, it’s the same thing as we have been doing.
There are also some functions that you can use inside the mysql query that sql has installed, we’ll get into some of those later properly when I show you guys some different things. Right now I'm just going over all the data basics and php basics but later on I'm actually going to be showing you how to build some cool systems like a—system, possibly registration and login, those can get pretty lengthy but anyway, thanks for watching the video guys. Sorry if this was a little bit confusing but it may start out that way but you’ll get used to it. I just wanted you to know that. It can take some time but like I said, Google have some stuff if you don’t know how or if you want to learn more about it, there’s a site called php.net, that’s the main php site. You can go there and type in any function name and get the entire detailed descriptions of it and examples and all that crap. There’s also—I have downloaded a php manual. It’s like the full php manual. Let me go on files here, books and resources, php full documentation, html. Here’s the full manual right here. This is going to open up one of these and click the php manual link to go back to the index.
Now, right now you—just go down, you can see all these links, these are two different things for php but the real feature of it is right down here at the bottom, the function index, you click that, it will show you every function in php. I'm going to go ahead and scroll down and show you all these. And this is just kind of like php.net. And to show you a trick, if you want to search for a function, press Ctrl + F, if you're on Firefox, you got this little find box down here. You can type the function name in here like—let me think, what's that function? Explode, and up here at the top, it has found explode for me. There it is right there. So we found it. Cool thing about it is you can click a function and it will once again give you a detailed description of it and tell you all about that, it even gives some examples. So it’s a really good manual. I'm going to click the link for this in the video description because I definitely want—I think you guys should check it out. It’s just a really great—it’s a really great thing to have, you can have it on your—if you don’t have internet like all the time, like I have for a while, then you can download this and always have it on your computer and just search up some functions.
Thanks again for watching the video guys and I will see you next time.