DB Error? [SOLVED]

General discussion of anything. Discuss a topic in and out of IntegraMOD

Moderator: Integra Moderator

DB Error? [SOLVED]

PostAuthor: MWE_001 » Wed Jan 09, 2008 12:34 pm

Hello all. I am working on a new mod for Integramod/Im Portal use. it is quite nice and works a treat for radio station websites.

My database works nice, EXCEPT i have 1 small minor issue that maybe some one can help with.

here is my db structure:

CREATE TABLE IF NOT EXISTS `request_song` (
`id` bigint(20) NOT NULL auto_increment,
`song` longtext NOT NULL,
`artist` longtext NOT NULL,
`name` longtext NOT NULL,
`shoutout` longtext NOT NULL,
`ip` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;

Nohere is the problem. everything shows up on the page properly as it should EXCEPT for shoutout. Not quite sure why it wont work.

A couple of screenshots to follow. (Click Images for large view)

Ok here goes in the first shot, you can see my request page ALL info was filled in before submit was selected.

[albumimg]28[/albumimg]


Now here is a shot of the requested songs page. Notice the shout out is empty? Its not even entered in the database either.

[albumimg]29[/albumimg]

The only thing I think besides an obvious db error is the fact that I need to go with a large text field somehow for shout outs.
Last edited by MWE_001 on Thu Jan 10, 2008 6:18 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: DB Error?

PostAuthor: obiku » Thu Jan 10, 2008 10:58 am

Are you sure you created your table correct??

If I look at the picture, it looks like your table is missing one cell. If the data was not inserted, that cell should be empty. (The cell does not have any border like the other ones).
Last edited by obiku on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
http://www.familie-smit.nl
http://portfolio.familie-smit.nl

Do not tsunami my inbox... instead use the forums...
Hard work may not kill me, but why take a chance?

[hr]
User avatar
obiku
Dev Team
Dev Team
 
Posts: 218
Likes: 0 post
Liked in: 0 post
Joined: Tue May 02, 2006 10:22 am
Cash on hand: 0.00
Location: level 8

Re: DB Error?

PostAuthor: MWE_001 » Thu Jan 10, 2008 5:23 pm

Thats kinda what I was thinking as well. Originally, I did not in fact, have the shout out item in there. It was added after all was said and done.

I could just as easily remove it, but I think it just gives and extra incentive to get users to send in requests while tuning in to the radio station.

The reason I was guessing db error was like I said, everything is stored in the DB BUT the shout out.

I could post my code here, BUT....... <img> Not quite sure I want to let loose of that one yet. Was kinda trying to hold off until I get it done and working stable.

This is my first genuine honest to Bugs Bunny attempt at a mod for IM/phpBB it's definately trial & error type of situation. Id say Im REAL close like to having it "There"

Im also working on a new and improved shoutcast menu/block as well.

****EDIT****
Well, i thought about it and I really need this to work. Here is a snippet of code and the forming of the table as you all saw in the pic.

Code: Select all
$query = "SELECT * FROM request_song ORDER BY id ASC"; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $id = $row['id']; $song = $row['song']; $artist = $row['artist']; $name = $row['name'];$shoutout = $row['shoutout']; $ip = $row['ip']; echo "<tr><td>".$id."</td><td>".$song."</td><td>".$artist."</td><td>".$name."</td><td>".$ip."</td><td>".$shoutout."</td><td><a>Delete</a></td></tr>"; } ?>
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: DB Error? [SOLVED]

PostAuthor: MWE_001 » Thu Jan 10, 2008 6:21 pm

I think this case was like the nut you cant get started on the bolt. You walk away for a while and come back and it goes right on.

What the issue was, was, I forgot to insert the shout out into the DB when the submit button was pressed.

I added the insert into the code and all is well. The field now populates. <img>
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: DB Error? [SOLVED]

PostAuthor: obiku » Fri Jan 11, 2008 11:31 am

OK, glad you find the solution
Last edited by obiku on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
http://www.familie-smit.nl
http://portfolio.familie-smit.nl

Do not tsunami my inbox... instead use the forums...
Hard work may not kill me, but why take a chance?

[hr]
User avatar
obiku
Dev Team
Dev Team
 
Posts: 218
Likes: 0 post
Liked in: 0 post
Joined: Tue May 02, 2006 10:22 am
Cash on hand: 0.00
Location: level 8

Re: DB Error? [SOLVED]

PostAuthor: MWE_001 » Fri Jan 11, 2008 5:20 pm

yeah and thank you for replying to the thread. I had put it on the back burner until you replied. Then I got thining about it after you said it was even missing the cell and I knew exaclty where to go look and sure enough, On submit, I was inserting everything into the db BUT the shout out. <img>

Now that it's solved, I can work on whooping it up into a releasable stable mod for radio websites.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois


Return to General Discussion

Who is online

Registered users: Majestic-12 [Bot]

cron