Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

03 November 2007


Total 17 pages. You are browsing page 3/17.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

02:06 <****> kay, sorry guys :/ I thought it was a quick fix and I thought it was related to mysql, not php:s mysql functions
02:06 <****> php's*
02:08 <****> The variables seem fine. They are just numbers. The generated queries look alright.
02:08 <****> Wrong parameter count for mysql_result()
02:09 <****> When I put the mysql_query result in a variable
02:09 <****> so *print* the *contents* of the *query*
02:10 <****> something will be wrong, somewhere
02:10 <****> adaptr: single-quoting int data types?
02:10 <****> Wait, it fails where there's no rows in the result. I thought I checked for that :/
02:11 <****> ki77a77: that's me doing that, or rather, our former developer
02:24 <****> The query I replaced was select count(*) as num where blabla; and it checked with if ($x != 0) which I just changed to mysql_num_rows($x) now
02:24 <****> And it's working.
02:31 <****> branstrom: perhaps a better check in php would be 'if(!empty($x))'
02:32 <****> maybe, thanks
02:35 <****> branstrom: Sorry, I meant that check for the original query result set.
02:36 <****> Yeah, but I'll remember it for the next time
02:37 <****> where's a good doc on moving the db to another filesystem? i have one that's getting to big for a partition ...
02:43 <****> vap0rtranz: are you doing backups on the database?
02:43 <****> ki77a77: yes, via mysqldump
02:45 <****> i'd expect there's some conf file that merely points to the directory where the db files are?
02:45 <****> vap0rtranz: you plan to alter my.cnf so that you have a new datadir setting?
02:45 <****> vap0rtranz: shut down the database, move the whole mysql directory and change the datadir= directive in my.cnf
02:45 <****> ki77a77: yes, i believe. just moving the data
02:45 <****> toebee: awesome, i think that's it
02:46 <****> vap0rtranz: ToeBee's plan is the easiest.
02:46 <****> vap0rtranz: just make sure you stop mysqld first! ;^)
02:46 <****> ki77a77: cool. i'd expect it'd be simple but just never done it b4 :)
02:49 <****> I have! :)
02:50 <****> been a couple of years though...
02:55 <****> toebee: but the basedir= stays the same b/c it's pointing to the libraries, aye?
02:56 <****> hi, i'm getting an error and was wondering if someone could help me figure it out.. here is a paste of the error: http://pastebin.ca/759374
02:56 <****> vap0rtranz: yes I believe so
02:57 <****> Interex: apparently the table News doesn't have a column named Snippet
02:58 <****> hmm, *checks*
03:02 <****> you're right
03:04 <****> no... I just read the error message. It was 100% accurate :p
03:05 <****> lol
03:05 <****> sorry.
03:57 <****> got an odd message from phpMyAdmin here... I just added some DECIMAL typed columns to my table, and when I go to insert a row I get several messages like this:
03:57 <****> Note: #1265 Data truncated for column 'product_price' at row 1
03:57 <****> in the INSERT statement the product_price is shown as '124.99'
03:58 <****> so wouldn't that be correct for a DECIMAL?
04:02 <****> Hahahahaha, I'm back now. Yes, this is talk radio, but without the radio.
04:03 <****> are there any mysql confrences coming up this winter ?
04:04 <****> I am trying to connect to a mysql database and run a query using php and have mysql_error() reporting in php. But after i hit submit in the form I just get a blank page. Any ideas.
04:05 <****> rakkar: print out the query and run it in a mysql console
04:07 <****> toebee you mean type the same query in mysql console the one i am trying to run in php
04:08 <****> yes but don't type it in manually... print out the actual query from within php
04:09 <****> common problem with php is a variable not being evaluated the way you think it is so the query doesn't turn out right and doesn't return any rows or returns an error or does something else unexpected
04:11 <****> toebee not sure how to do that "printing out query in mysql"
04:11 <****> even more often, using interpolation directly in the mysql_query call so you can't "easily" echo the query.
04:11 <****> rakkar: www.php.net/echo || www.php.net/print
04:19 <****> hi
04:21 <****> while creating tables using sql statements when is the proper time to set an index? in the original table or in the related table that uses the data?
04:22 <****> is it possible to 'duplicate' a table ?
04:22 <****> i have db.table1 and need it to be the same as db.table2
04:22 <****> create table new_table LIKE old_table; insert into new_table (select * from old_table)
04:23 <****> ToeBee: thanks.
04:24 <****> lwizardl: in general you want an index on fields that you use in the WHERE clause and in fields that you join on
04:26 <****> lwizardl: http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html
04:26 <****> Unknown column 'Blogs.OwnerID' in 'on clause'
04:26 <****> ToeBee: what is in 'on clause' ?
04:27 <****> an ON clause is used in a JOIN statement
04:27 <****> ToeBee, ok becuase these tables in question are going to b left joined but wasn't sure if I need to set it for example in the users table or in the state table
04:27 <****> so now i dont understand what caused this error
04:28 <****> ToeBee: http://pastebin.ca/759438
04:31 <****> looks ok to me... looks like you may have had `Blogs.OwnerID` instead of `Blogs`.`OwnerID` or something...
04:32 <****> you do know you don't need the table name, as long as the column name is unique, right?
04:32 <****> and really you don't need the ` unless you are using reserved words or special characters
04:33 <****> ToeBee: But of course, you're always on the safe side if you do
04:33 <****> i dont even have OwnerID
04:33 <****> ToeBee: Developers might add new columns.
04:33 <****> ToeBee: i have UserID
04:33 <****> ToeBee: Or MySQL might add new reserved keywords :)
04:33 <****> true
04:34 <****> but I still don't do it :)
04:34 <****> Interex: well then there's your problem...
04:34 <****> ToeBee: We're all lazy
04:34 <****> ToeBee: so its basicly saying "no OwnerID" ?
04:36 <****> if you don't have a column named OwnerID then yes... you can't use colums that don't exist!
04:37 <****> ToeBee: heh this is the trouble i get from "upgrading" one CMS to another CMS
04:37 <****> but i'm slowly getting it together
07:13 <****> i've bought
07:13 <****> a mysql official guide
07:13 <****> :p
07:28 <****> n0t: then you probably have better information than 80% of this channel :)
07:28 <****> n0t: congratulations!
07:28 <****> n0t: now get official mysql services! :)
07:28 <****> muhuhu
07:28 <****> /usr/local/mysql-wikimedia-google/libexec/mysqld: ready for connections.
07:28 <****> Version: '4.0.26-wikimedia-google-20071102-log' socket: '/tmp/mysql.sock' port: 3306 Super duper custom build
07:28 <****> i want to get mysql certiicated
07:29 <****> ToeBee: not really..
07:30 <****> i've bought.. i've not yet begun to read it ^^
07:30 <****> heh good point
07:30 <****> ^^
07:31 <****> heh
07:31 <****> mysql certified = good
07:31 <****> I still miss 5.0 certs
07:31 <****> though the only one who beat me on 4.0 cert speed was Paul DuBois


Total 17 pages. You are browsing page 3/17.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo