PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi the problem i have is that my function won't insert anything into the table i want it to. can anyone see if there is a problem with my coding, the database connections are fine.
$result = mysql_query($query, $link_id) or die(mysql_error());
This will output the error returned by mysql, if the query doesn't work.
Also, output $query before you send it to the db. It may not look exactly like you expect it to (there might be un-escaped quotes in there which are scewing up the query).
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
cat_no => NULL (must be without quotes !)
title => 'Call On Me Remix'
artist_id => 'Jay-Z'
release_date => '2001-4-3'
genre_ref => '4.99' (this should probably go into price column)
price => '3' (this should probably go into stock_level column)
stock_level => 'test' (this should probably go into vinyl_information column)
vinyl_information => ????
So you try to insert 7 values into 8 columns => your error message
More specifically, I think you're missing the genre_ref column into your values list.