#mysql
15 October 2007
Total 27 pages. You are browsing page 1/27.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Mon Oct 15 00:00:18 2007
00:12 <****> hey guys what kind of program can i use to open a 240 megabyte sql database without it freezing on me?
00:14 <****> i need to view it as text so i mean what text editor
00:14 <****> view the whole thing?
00:14 <****> or a specific part?
00:14 <****> the whole t hing
00:14 <****> you know how long that will take?
00:15 <****> heh i don't mind how long
00:15 <****> why don't you just import it into mysql then use sql to look at specific records
00:16 <****> it's imported and then when I try to export via phomyadmin and copy the tables and import on a new table the records don't show up only the tables
00:17 <****> i export as text and then copy the stuff...it worked once and now it's not importing the records
00:17 <****> importing via sql query
00:18 <****> *to a new database
00:18 <****> i figure the only way to import correctly now via phpmyadmin is to open the whole database on a text editor then copy and paste into the sql query on an empty db
00:19 <****> but it's freezing anything I try to open it with
00:27 <****> maybe I'm doing it wrong...I'm trying to export as SQL and I uncheck Data so it outputs text on the window. Then I copy and paste that into an SQL query on an empty table
00:28 <****> then when i do that the tables are created but there are no records!
00:28 <****> *empty db
00:32 <****> what program are you using
00:33 <****> phpmyadmin
00:33 <****> I know it work once before
00:34 <****> why not just use mysqldump
00:34 <****> I'll look into that thanks
00:35 <****> hmm
00:35 <****> SELECT * FROM `ticket` LEFT JOIN `message` LEFT JOIN `message_content` LEFT JOIN `requester` ON (ticket.id = message.ticket_id, message.ticket_id = message_content.message_id, requester.ticket_id = ticket.id) WHERE requester.address_id = 3
00:36 <****> why do i get an SQL syntax error?
00:36 <****> errors at "WHERE requester.address_id
00:36 <****> AND
00:37 <****> erm...where do i need that? :P
00:37 <****> whats the difference between doing an index when table is created and doing a key for example?
00:38 <****> Ramattack: key creates an index
00:38 <****> yes I know but...
00:38 <****> oh
00:38 <****> i see
00:38 <****> maybe its UNIQUE by default, i dont know if theres an exact difference offhand, try the docs
00:38 <****> the difference.. well between specifying a key or primary key and index on (...)..
00:38 <****> SELECT * FROM `ticket` LEFT JOIN `message` LEFT JOIN `message_content` LEFT JOIN `requester` ON (ticket.id = message.ticket_id AND message.ticket_id = message_content.message_id AND requester.ticket_id = ticket.id) WHERE requester.address_id = 3 <- get the same error with that :P
00:39 <****> well primary key should be obvious
00:39 <****> that was for me jbalint ?
00:39 <****> Anyone know a good place online with pratice exams for the DBA I exam?
00:40 <****> Ramattack: yes
00:40 <****> hmmm
00:40 <****> sorry can't understand you... what did you mean with it's obvious? don't understand... sorry
00:40 <****> [domon] you need to add the requester table to from
00:41 <****> for example, i got result 1row:id=46, 2row:id=12, 3row:id=93, 4row:id=3, 5row:id=300
00:41 <****> ahhhhhh
00:41 <****> how to get row next id=93
00:42 <****> jbalint: still get the same error :P
00:42 <****> jbalint, I see a key always creates an index
00:42 <****> to get 4row:id=3 in this case
00:42 <****> but... a index sentence... creates a index manually instead of doing it creating a key??
00:43 <****> wanted to mean instead of creating automatically?
00:43 <****> [domon] what is the error
00:43 <****> and two
00:43 <****> your FROM
00:43 <****> needs to have evyr table you reference
00:44 <****> so it looks like message_content and message as well
00:44 <****> SJrX: ahh ok
00:44 <****> anyone please could explain me this difference?
00:44 <****> now i get "not unique, table/alias: 'ticket'"
00:45 <****> more than one of those tables has a column called ticket
00:45 <****> so you have to select which one of those tables you mean
00:45 <****> anyone?
00:45 <****> concerning my q
00:45 <****> fulketerraun repeat it
00:45 <****> SELECT * FROM `ticket` LEFT JOIN `message` ON (ticket.id = message.ticket_id) where ticket.id = 5; <- that works, and fROM doesn't have `message`
00:45 <****> how can I set the auto_increment (initial) value for a (new) table?
00:45 <****> sorry I just joined late
00:45 <****> hmmmmm
00:46 <****> for example, i got result 1row:id=46, 2row:id=12, 3row:id=93, 4row:id=3, 5row:id=300
00:46 <****> [domon] hmmmm maybe you don't need all of them on FROM but since it changed the error message to something you also have an error with, I think that it fixed it.
00:46 <****> SJrX: also, none of the tables seems to have a column called ticket...but i'm not sure where i'm calling that column either
00:46 <****> how to get row next id=93
00:46 <****> to get 4row:id=3 in this case
00:46 <****> oh
00:46 <****> or to get row next to id = 12
00:46 <****> Well there is probably a better way but
00:46 <****> i have table.ticket_id but not table.ticket
00:46 <****> :P
00:47 <****> oh
00:47 <****> hmmmmmm
00:47 <****> fulketerraun you're concerned about the order in your DB?
00:47 <****> if that is your primary key I don't see how you can get out of it
00:47 <****> otherwise you could just go on primary key
00:47 <****> Looks like maybe: ALTER TABLE tbl AUTO_INCREMENT = 1000; (trying now)
00:48 <****> i just know id and want next id in result to create next link on my page
00:48 <****> is your id your primary key?
00:48 <****> i get id from url
00:48 <****> hmmmm
00:48 <****> I think you need some kind of other key to sort by
00:48 <****> maybe a timestamp
00:48 <****> yes but i got very special order by
00:48 <****> when using left join, you dont need to specify the tables individually
00:48 <****> [domon] fair enough, but it fixed that error
00:49 <****> SJrX: one solution i while in php
00:49 <****> SJrX: well my problem was definitely not using requester in FROM
00:49 <****> *is
00:49 <****> since WHERE was using that table
00:50 <****> but when db becomes bigger ...
00:50 <****> not sure
Total 27 pages. You are browsing page 1/27.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
