| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Account Closed | Can anyone help me please? :] Hi, I was wondering if somebody would be able to help me. I want to have a page on my website where i can see all layouts that have been submitted to my database that have a status set as inactive. I know how to output those but i just need a tick box or button/link to delete a layout row from the database (if i dont want to add it to my website) and a tick box or button/link to change the status from inactive to active (if i want to add it to my website). Thanks in advance! UPDATE!!!! Okay, i've done the delete row and edit status links but i've realised it's crap LOL. Each time i add a row to my database it automatically adds an id, which is a number going up in order. Im upto 330 layouts now, i just added a test layout with an id of 331 and deleted with the function i just created (that i asked for help with above) so it deletes the row but then when i add another row it adds an id of 332, but i'd like it to use 331 again (if the row doesn't exist for the id) - anyone know what i could do here? Last edited by Fun4Free.co.uk; 12-18-2006 at 02:22 PM. |
| |
| | #3 (permalink) | |
| NamePros Member | Quote:
EDIT: On a better note; i'll explain it a bit more, my post above sounds a little odd :P You would need to do the following steps: 1) Turn off "auto_increment" for "id" 2) Rebuild the database Then when you isert a row, you would need to do the following: PHP Code: Hope this helps ![]() - Richard Anderson Last edited by Cybo; 12-19-2006 at 02:06 AM. | |
| |
| | #4 (permalink) |
| NamePros Regular | Although considering all the code needed to do that, you might be better off just letting it auto-increment. And then sort out the numbers in your site's interface... Why do you need to get the id's in order so much?
__________________ -Beaver6813.com V5 Soon! |
| |
| | #5 (permalink) |
| Account Closed | Thanks alot cybo ![]() Im just fussy, i guess i don't really need it lol. Hmm i think i will leave it then instead of making more work for myself when it's not needed =P. I have another question if any of you are up for helping me? this question is about my new website BangVideoBang and i want to add tags for videos i put up on the site now, view this video for example: http://www.bangvideobang.com/videos/...e-session.html I have added some tags for it, is there anyway that i could make each tag goto something like this: http://www.bangvideobang.com/videos/tags.php?tag=bmx http://www.bangvideobang.com/videos/...tag=dave+mirra http://www.bangvideobang.com/videos/...?tag=back+flip http://www.bangvideobang.com/videos/...?tag=warehouse (i haven't added tags.php yet so the links above won't work) Those are the tags i have added for that video, i want it so a visitor can click any of the tags and then it will go off and get all the videos with that tag in it. Anyone know how i could do this? Im new with php and mysql so i don't know much. Thanks alot. |
| |
| | #7 (permalink) |
| Account Closed | Yeh they are. what do you mean the layout of the database? (sorry lol) Is it the structure? Click Here: http://img246.imageshack.us/img246/884/structurepe0.png I bet it's all wrong heh lol. I use name for the tags. Gotta sort those field names out at some point. |
| |
| | #10 (permalink) | |
| NamePros Member | Quote:
![]() I wont do the html, but I will put where you need to put it :P Give me a little while | |
| |
| | #12 (permalink) |
| NamePros Member | tags.php PHP Code: Again, hope it helps :P |
| |
| | #13 (permalink) |
| Account Closed | Thanks for your help cybo but i didn't explain what i needed properly =P I know how to do the tags.php page to output the video listings for the selected tags. I just don't know how to change the actual tags on the video pages into links, so that a visitor can click on the tag which goes to tags.php?tag=blah. I add the tags to the database as 'tag, tag tag, taggy, tagoo' etc lol. I could add them as links directly into the database but i was just wondering if there is a small php code that would make all the tags that are outputted display as links instead of just text as you see on: http://www.bangvideobang.com/videos/...out-the-e.html under video information. Thanks alot though mate, reallly appreciate it ![]() UPDATE!!! I've added the tag links now, have a look: http://www.bangvideobang.com/videos/...out-the-e.html |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |