User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 392,071 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,268 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1177 | Replies: 2
Reply
Join Date: Jul 2006
Posts: 4
Reputation: wlinda is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wlinda wlinda is offline Offline
Newbie Poster

Help php mysql problem

  #1  
Jul 20th, 2006
I've been having this php/mysql problem that I can't seem to be able to fix. I'm displaying information from a mysql database on my site, but for some of the variables only half of the cases can have information in tehre that needs to be displayed on the site (e.g. the script is about an artist who sometimes features others in his videos and sometimes he doesn't and only if he does I want to show a "featuring" "Name" in my output). Because I'm posting all my code here I don't know if I should elaborate, so please ask me if you need to know more and if my story is too vague, please let me know what you wanna know! I really hope you can tell me how to get my script to work. My database:
CREATE TABLE `vids` (   `v_id` tinyint(2) NOT NULL auto_increment,   `year` year(4) NOT NULL default '0000',   `video` text collate latin1_general_ci NOT NULL,   `feat` text collate latin1_general_ci NOT NULL,   `direct` text collate latin1_general_ci NOT NULL,   `album` text collate latin1_general_ci NOT NULL,   `extra` text collate latin1_general_ci NOT NULL,   `caps` text collate latin1_general_ci NOT NULL,   `watch` text collate latin1_general_ci NOT NULL,   PRIMARY KEY  (`v_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=44 ;
Example of database (I shortened the content to a couple of letters, some of the fields are still empty and I'll fill them in later, but the empty ones are not the ones of concert in the php script, only the one that does sometimes have content and sometimes it doesn't = "feat"):
INSERT INTO `vids` VALUES (1, 1993, 'OC', '', '', 'PP', '', '', ''); INSERT INTO `vids` VALUES (2, 1993, 'SBD', '', '', 'MLL', '', '', ''); INSERT INTO `vids` VALUES (3, 1994, 'NAL', 'RAY', '', 'PP', '', '', '');
My script:[code]
Last edited by wlinda : Jul 20th, 2006 at 7:05 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Posts: 4
Reputation: wlinda is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wlinda wlinda is offline Offline
Newbie Poster

Help Re: php mysql problem

  #2  
Jul 20th, 2006
sorry I saw my message didn't fit >> My script:[code]
Last edited by wlinda : Jul 20th, 2006 at 7:09 am.
Reply With Quote  
Join Date: Jul 2006
Posts: 4
Reputation: wlinda is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wlinda wlinda is offline Offline
Newbie Poster

Re: php mysql problem

  #3  
Jul 20th, 2006
sorry I don't know what I'm doing wrong but I just couldn't get the script inserted. here it is (just 2 kb or something for download) http://rapidshare.de/files/26392348/pleasehelp.txt.html
Last edited by wlinda : Jul 20th, 2006 at 7:15 am.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 12:00 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC