This is a discussion on "A little help needed - Select info from DB and display on page" within the PHP Forum section. This forum, and the thread "A little help needed - Select info from DB and display on page are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
A little help needed - Select info from DB and display on page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi there,
I'm trying to modify a script. I have tried the scripts support forum but u-it just plain sucks. Looks abandoned Well, I am completely overhauling the templates and starting from scratch. I need to do two things in order to proceed and this is the point at which I have become stuck. I would be greatfull if someone could advise me how to do the following: In a users profile you can see the last video the user uploaded, but you have to be on the users profile for the peice of code to work because then it knows which user its looking for to see which video was the last one they uploaded. What I want to do is in my last 5 users online, I would like it to also show the last video each of the five users uploaded. My problem is as I said, when I use the profile page code, it is unsuitable becasue it has no idea which UID it is looking at because I am not on the profile page. I'm assuming I need to let the code know what user somehow but I dont know how. The code to call up the last user video is here:
pervbox [dot] com/uprofile.php?UID=2 The url I am trying to display the info on is here: pervbox [dot] com/index.php In the last 5 users on line module My other problem, which is of secondary importance to getting the above solved is: I want to do the same thing as above but instead I want to be able to select and show the user with the most video uploads. I want to show the info like above ie the thumb of the video, the username of the person and the vid details. The script I am running is using PHP & the smarty template engine incase that helps. I know it seems complicated but it isnt. I am no DB expert so I dont know how tp write the code I need. Evrything I can think of doesnt work and results in no page loading. lol. Thanks in advance!!!!
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
|
|
|
|
#2
|
|||
|
|||
|
Re: A little help needed - Select info from DB and display on page
Yes, it does help to know that you're running with PHP and Smart, and in fact we would need to know a bit more about what goes on inside there in order to answer the question; what you've posted so far is a little bit like a punchline without the joke leading up to it.
You may be surprised how much PHP / SQL that you need to learn to make what appears to be a simple change - hard to judge at this stage. I certainly think that whoever helps will need to see a lot more code. And it may be the job isn't best done through an exchange on a forum. Where abouts in the UK are you based? |
|
#3
|
|||
|
|||
|
Re: A little help needed - Select info from DB and display on page
Hi there graham,
thanks for replying! This is my first template with smarty. I have had some experience when I toyed around with oSdate a while back but nothing this indepth. What I have done is to competely re-write the template and then replace the functional parts of the code where they would have been in the old template. So far this is working out well (ish). How can I best describe my skill level? Its very difficult but I have had no formal training. All my knowledge comes from dicecting pages and scripts and working out what does what myself. I can do html and css pages a doddle as far as my skill in that area is concerned. I can work with most scripts and cms's and can usually modify them sufficiently but when it comes to pure code..forget it. I can read the stuff and work out what it does enough to modify it, but if I need anything written I have to either code snippet scavenge or ask others. I wouldn't mind some formal training in PHP and Mysql but in my area near Leicester in the midlands but there simply is nothing available. I'm not the kind of person that learns from reading books, I need to get my hands in in order to understand things. I can follow tutorials fine, but I have tried these learn php for beginner sites and I dont have a clue what they are on about. I dont even know what $ means or does and they never seem to explain the basics in these teach yourself sites. My skill level is mix and match to say the least. jack of all trades and definately master of none lol. RE: my problem.. I can certainly post more code but I'm not sure what my helper will need to see. I thought about posting my database sql for a start so that whoever helps me could at least see what needs to be selected from the info stored, but I didnt want to get to carried away incase I posted the wrong info lol Thanks again!
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
Last edited by weasel; Jul 6th, 2007 at 17:58. |
|
#4
|
|||
|
|||
|
Re: A little help needed - Select info from DB and display on page
I would love to be able to give you a quick hand looking at all the PHP code and the SQL. Yet as you implied, there is so much to these subjects that the tutorials start of with what seems irrelevant theoretical stuff and trivial examples; there's just so much involved that a question and answer session here is probably not the best way to learn it all. You are, by the way, utterly correct not to paste up huge chunks of code here as anyone who tried to look at them would be looking for a needle in a haystack, and most technical people are rather too busy to spend their time doing a lot of that.
Having an idea this was likely to be the case, that's why I asked where you were located on the chance that you happen to be near one of the experts who post here. You might even have been near to us ... but having looked at the URL you gave / potential site content, I can understand why you may not want to disclose location. And of course there will be a sizable proportion of potential experts who may prefer not to help Last edited by grahame; Jul 7th, 2007 at 07:25. |
![]() |
| Tags |
| display, info, select |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drop down menu info displayed on same page? | Dopeness | JavaScript Forum | 4 | Sep 9th, 2008 17:00 |
| How to put your menu/static info. on every page | lmc148 | Starting Out | 18 | Jun 29th, 2007 09:53 |
| need to onclick to open info in div on same page | apster | JavaScript Forum | 2 | Apr 30th, 2007 09:56 |
| Trying to pass JSP variables into input:select attributes. Help badly needed | danwms | Other Programming Languages | 2 | Apr 19th, 2007 09:44 |
| Displaying diff info on the same page | waheeddin | Web Page Design | 1 | Feb 23rd, 2007 19:56 |