in reply to Limit loop

While others have helped you with your current problem of splitting the column, I'm going to suggest that your future problem will be that you didn't normalize your database and put the favorites in their own related table. It seems highly likely that some day you might want to write a SQL query to find out which favorites link to which sites, or rewrite some URLs in the favorites, and you could do it more easily if favorites were a table.
-- supposing favorites are attached to user records CREATE TABLE user_favorites ( userid integer not null, title varchar(100) not null, link varchar(255) not null, num integer not null, PRIMARY KEY (userid, title), FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE );

Or, even if you hate the idea of a second table, you could store favorites as JSON and on most modern databases you can also reach into that with SQL.

Replies are listed 'Best First'.
Re^2: Limit loop
by htmanning (Friar) on Aug 31, 2022 at 19:39 UTC
    Totally agree. I need to create a separate table for favorites. It's an absolute mess the way it is. Thank you!