Log in

View Full Version : userid is "0" on all posts


Valter
06-24-2006, 11:30 AM
I have situation where for all posts in database userid is "0" (table post). Don't ask how...

username column is OK.

Is there a query which will fix this?

Paul M
06-24-2006, 01:03 PM
Technically you could probably do it with a bit of fancy sql (on later mysql versions).

Personally I would write some php to run a query to join post & user (on username) and just extract the postid and userid, then step though the results updating each post one by one.

More queries, but easier to understand, and it's only a one off.

Valter
06-24-2006, 08:13 PM
Nevermind, fixed it.