SQL Query problem

Talk about and discuss various advancements and achievents in the arts and sciences of invention and modification; computers, sciences, mathematics, and technology for all.
Post Reply
gtsch
Posts: 17
Joined: Tue Jan 10, 2006 10:18 pm

SQL Query problem

#1

Post by gtsch »

I want to setup my main page to pull from the database for the main news story url and snippet, I've set that end up and it works.

I want to be able to submit changes to the database via a form for my staff who aren't that tech savvy. I don't know what code to use to tell it to replace the row of the table. It's the only row on the table but if I refer to specifics to replace the code will be invalid on it's next use as they have changed. Is there a way to tell it to delete that row and create a new one? still have a problem with specifics though.

EDIT:

I ran this successfully through phpmyadmin

UPDATE `mainpage` SET `pictureurl` = '3',
`storyurl` = '5',
`headline` = '213',
`snippet` = '2' WHERE `pictureurl` = '%' AND `storyurl` = '%' AND `headline` = '%' AND `snippet` = '%' LIMIT 1 ;

Problem is that it says zero rows affected, how do I change that?

BBcode:
Hide post links
Show post links
Post Reply