Forum Moderators: open
im still busy to save my site and my major problem is how to select my downloads..(based on category) and dump it into the new table...
if i do this......
SELECT cid, title, url, description FROM old_downloads
shows everything but i realy want to select only cid 36 .
(that means category 36)
how do i dump it directly into another table?
and does the table with rows need to have the same name?
does this makes any sense?
that works indeed...
but its not clear how i can make /get a dump to insert it....
imagine that it needs to go into a new table with same 4 or 5 rows..
how do i do that...?
cause if i use :
SELECT cid, title, url, description
FROM old_downloads
WHERE cid = '36'
i would like to INSERT it into a new table...
INSERT INTO new_downloads SELECT cid, title, url, description FROM old_downloads where cid = 36
This assumes that table new_downloads contains four fields that match cid, title, url, description in type, and preferably also in length. The field names don't need to be the same. This works on version 5.0.15 of MySQL.
i just forgot something...
i cannot insert it like this cause the new table has a cat id to...
so if i use..
INSERT INTO old_downloads SELECT cid, title, url, description FROM old_downloads where cid = 36
it inserts without defining the catid...
for example...the catid i would insert it in...would be 105.
how do i solve this..?