Re: [PHP] Delete row in a lookup table

2007-08-27 Thread nitrox .
7;]) || $_GET['do'] != 1) { ?> Are you sure you want to delete this ? yes or Index WHERE Game_id = '" . mysql_real_escape_string((int)$_GET['gid']) . "' AND Member_id = '" . mysql_real_escape_string((int)$_GET['mid&#

[PHP] How do I delete a composite key?

2007-08-26 Thread nitrox .
Im trying to delete a composite key but cannot figure out the proper format. Would somebody tell me where im messing up? I have an url that is supposed to send the member id and game id to a delete query. And the delete query is supposed to grab the id's based on type. This is the link: hre

[PHP] Declare variables in advance question

2007-08-20 Thread nitrox .
I want to declare these variables Game_id and Member_id in advance. Following the suggestionfrom one of my books can I do something like this: $expected = array('Game_id', 'Member_id');foreach($expected AS $key) {if ( !empty($_POST[$key])) { ${$key} = $_POST[$key];}else {

[PHP] Delete row in a lookup table

2007-08-18 Thread nitrox .
Hi all, Is it not considered good practice to have a primary key on a lookup table for a database? I have 3 tables setup, games, memberleagues and members. The memberleagues table holds the id of the games table and members table. The problem I have is that Im not sure how to delete a row from

[PHP] Display paragraphs from a mysql db

2007-06-24 Thread nitrox .
hi all, I have a news section on a website that im coding that isnt displaying properly. Every paragraph in each news post is being displayed as one big paragraph. how can i display my paragraphs in proper form? The field the news story is stored in is set as longtext. here is a link to view.

Re: [PHP] Select record by ID

2007-01-30 Thread nitrox .
Thanks to all who have replied. As you probably have noticed im a total novice to php who is trying to achieve big things. Richard, ive included your suggested code and now my php script is working properly. But I dont want to be a php copy/paste newb who has no clue of how things are working.

Re: [PHP] Select record by ID

2007-01-28 Thread nitrox .
I took the quotes off. I thought that quotes around numbers was wrong also. I added the error checking and this is the error: Could not perform query : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at li

[PHP] Select record by ID

2007-01-28 Thread nitrox .
Before I ask my next question I just wanted to thank you all for being in this mailing community and sharing your knowledge. Its communitys like this that make life easier for all of us. Ok enough with the mushy stuff Im trying to display one record at a time by ID. Well im getting a blank pag

Re: [PHP] multidimensional array problems

2007-01-19 Thread nitrox .
Ive followed your example on grouping. Im still trying to understand all of the code but ive made great progess on this with your example. Now I have one last issue and this will be solved. Ill remind here what Im trying to achieve I have a table for leagues, lookup table and team roster. There

[PHP] multidimensional array problems

2007-01-13 Thread nitrox doe
ault '', `monitor` varchar(100) default '', `mouse` varchar(100) default '', PRIMARY KEY (`user_id`)) TYPE=MyISAM AUTO_INCREMENT=3 ;-- -- Dumping data for table `inf_member`-- INSERT INTO `inf_member` (`user_id`, `user_level`, `list_order`, `user_name`, `password`,