AW: Merging 2 Fields

2004-06-26 Thread Freddie Sorensen
David, Maybe the CONCAT() function is what you are looking for ? Freddie > -Ursprüngliche Nachricht- > Von: David Blomstrom [mailto:[EMAIL PROTECTED] > Gesendet: Sonntag, 27. Juni 2004 08:07 > An: [EMAIL PROTECTED] > Betreff: Merging 2 Fields > > I think I recall a thread where someone

RE: Merging 2 Fields

2004-06-26 Thread David Rodman
You mean something like this? mysql> create table nads( -> state varchar(50), -> url varchar(100)); Query OK, 0 rows affected (0.03 sec) mysql> insert into nads values('California', 'http://www.california.gov'); Query OK, 1 row affected (0.00 sec) mysql> insert into nads values('Florida'

Merging 2 Fields

2004-06-26 Thread David Blomstrom
I think I recall a thread where someone mentioned merging two fields. If that can be done, I'd like to know how. For example, suppose I have a field filled with place names, next to a field filled with links: California | Florida | I'd like

Re: Displaying Numerals & Dates

2004-06-26 Thread Wesley Furgiuele
David: Sorry. I wrote that out poorly. I missed the closing parenthesis on the foreach(). Here it is in a cleaned-up form: Oh, also, you could/should zero out your mktime( ) function so looks like this (although it's not terribly important): mktime( 0, 0, 0, $month, $day, $year ); Apparently

Re: Displaying Numerals & Dates

2004-06-26 Thread David Blomstrom
--- Wesley Furgiuele <[EMAIL PROTECTED]> wrote: > Otherwise, you could use PHP's date formatting > functions as well > (assuming you are getting the date in -MM-DD > format: > foreach( $data as $r { > list( $year, $month, $day ) = explode( "-", > $r['Dates'] ); > $formatted_date

DELETE doesn't delete?

2004-06-26 Thread Margaret MacDonald
It's possible that this is more a php question than a mysql question, but since the two are so nearly joined at the hip, I'm hoping someone can advise anyhow. I'm developing a php job that uses a table 'sessions' to maintain a logical session across pages and physical sessions. It's a simple tabl

Re: Displaying Numerals & Dates

2004-06-26 Thread Wesley Furgiuele
David: For number formatting, in your below example, use: http://us2.php.net/manual/en/function.number-format.php For date formatting, try grabbing the date from MySQL in the format you want to use: SELECT DATE_FORMAT( date_field, '%M %D, %Y' ) AS `Dates` FROM ... and then just print $r['Dates']

Displaying Numerals & Dates

2004-06-26 Thread David Blomstrom
I asked some questions about displaying numerals and dates recently and got some good feedback. Now I'm ready to do it - but I'm doing something wrong. Consider the table below, where the field "Numerals" displays regular numerals (e.g. 2500) and "Dates" displays dates. Exactly how would I rewrit

MySQL from Python Error

2004-06-26 Thread Paul Maine
I encountered the following error when trying to perform a SQL UPDATE to a MySQL database table from Python. I would apprciate any assistance. In the Python code I have tried integer and decimal format specifiers in addition to the string specifier and nothing worked. Traceback (most recent call

pashto/dari/arabic character sets question

2004-06-26 Thread Bill French
hello, i'm building a php/mysql based system for reporters on the ground in afghanistan to file stories -- in english, pashto, and dari. will i have to do anything special when compiling mysql so that it supports the right character sets? are arabic character sets supported by default in 4.1? i

RE: Question

2004-06-26 Thread Schalk
Why is the following query retuning doctype's different to what is asked for? SELECT * FROM documents WHERE jstate = 'California: State Court' AND doctype = 'Verdict' Any ideas? Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Bran

Re: error 27

2004-06-26 Thread J S
Ahh Yes! That will be the file size limit in /etc/security/limits (or something like that) won't it?! OK I'll set that to unlimited. Thanks a lot! js. What FAQ are you talking about? The manual seems quite clear that there is no such limitation

Re: insert into text field [Solved]

2004-06-26 Thread Michael Stassen
Spaces were not the problem here. "desc" is a reserved word, which makes it a poor choice for a column name, as you'll have to quote it with backticks (~) every time you use it. Michael Nitin wrote: Solved. - Original Message - From: <[EMAIL PROTECTED]> To: "Nitin" <[EMAIL PROTECTED]> S

Re: basic information on setting up a mysql db for remote access...

2004-06-26 Thread Michael Stassen
You should start with section 5.4, "The MySQL Access Privilege System," in the manual . It details limiting access as you describe. Michael bruce wrote: hi... i'm trying to get a better understanding of how i can create/use mysql for an a

Re: mysql function inet_aton/inet_ntoa

2004-06-26 Thread Michael Stassen
Ron McKeever wrote: I am storing ips in a mysql 4.0.17 db as int. I am Converting them using a perl script with inet_aton to create a four-byte string. My goal: Is to return the ip as a normal dotted ip for the user to see after a select statement is done via a php web page. The ip is entered in as

Re: error 27

2004-06-26 Thread Michael Stassen
What FAQ are you talking about? The manual seems quite clear that there is no such limitation in MySQL, regardless of column type. The default max size of a MyISAM table is 4 Gb, but this can be increased either in the original CREATE TABLE st

mysql function inet_aton/inet_ntoa

2004-06-26 Thread Ron McKeever
I am storing ips in a mysql 4.0.17 db as int. I am Converting them using a perl script with inet_aton to create a four-byte string. My goal: Is to return the ip as a normal dotted ip for the user to see after a select statement is done via a php web page. The ip is entered in as a dotted ip on the

Re: Populating a from a database

2004-06-26 Thread Frank Bax
Might I suggest separating the mysql calls and html code into separate functions by storing selections in an array first. Then you can more easily manipulate the array for 'none' between the two function calls. The function generating html code could then be called with data not originating f

Re: Using SQL query to populate a html form select field

2004-06-26 Thread Frank Bax
At 07:52 PM 6/25/04, Kyle Texan wrote: I want to take 1 field in a mysql table and use that information to populate an html form select field instead of writing the html code, that way when data changes in that mysql field the form will always be in sync with the table? You need to use a programmi

Select problem for column with Binary attribute

2004-06-26 Thread Michael Lee
Hi, I am using MySQL 4.0.20. For a table of INNODB type, same query return different results when different query plan is used. select * from project_team where project_id = 'FMS '; --> 2 rows. (primary key used) select * from project_team ignore index (PRIMARY) where project_id = 'FMS ';

Collations

2004-06-26 Thread Daniel Kiss
Hi Everyone, I used MySQL 4.1.0 and I've just upgraded to 4.1.2. I have noticed that several character sets and collations are just disappeared somehow from the new version. I have checked it with the 'show collation' and 'show character set' command. Is there any switch or configuring option t

Re: error 27

2004-06-26 Thread Michael Stassen
You can check error numbers with perror. : perror 127 Error code 127: Unknown error: 127 127 = Record-file is crashed You need to repair your table. See the manual for details . Michael J S wrote: Even the ALTER gave me an error! mysql> alter

RE: Populating a from a database

2004-06-26 Thread electroteque
here is how i would do it, a slight change to the if else .. function filelist($fileID) { $result=mysql_query("SELECT ID,title,type FROM files"); echo ""; echo "---NONE---"; if (mysql_num_rows($result)==0) { //no files } else { while ($row=mysql_fetch_array($result)) { $ID=$row["ID"]

Re: Populating a from a database

2004-06-26 Thread Andrew Pattison
I use this method also, but I usually put a --NONE-- item in at the top of the listbox so the user has the option of selecting none of the items in the list. This may or may not be required for your application. Also, you can get the select box to automatically have the value that the a given fiel

Re: MYSQL Setup Question

2004-06-26 Thread Andrew Pattison
You are probably better setting up permissions using the GRANT statement since this should be less prone to errors. Using the GRANT statement, you name the permissions which you want to give the user. This means that you are less likely to put a "Y" where you didn't mean to. Use a statement like:

basic information on setting up a mysql db for remote access...

2004-06-26 Thread bruce
hi... i'm trying to get a better understanding of how i can create/use mysql for an app i'm working on. i have a number of servers running perl apps... i want to be able to create a database on a client (database) box, and have the other apps communicate with this database server/mysql box. i'm t

Re: insert into text field [Solved]

2004-06-26 Thread Nitin
Solved. - Original Message - From: <[EMAIL PROTECTED]> To: "Nitin" <[EMAIL PROTECTED]> Sent: Saturday, June 26, 2004 4:33 PM Subject: Re: insert into text field > look *carefully* at the insert syntax, paying attention to spaces and > the like: > > INSERT INTO tbl_name () VALUES(

insert into text field

2004-06-26 Thread Nitin
Hi all, There's a problem. When I try to inert into table with insert into schedule (owner, desc, sch_for, status) values ('a', 'b', 'c', 'd') I get error You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'd

RE: MYSQL Setup Question

2004-06-26 Thread Leon Ellis
Thanx Peter, But I have no tables set up yet. I just installed MySQL I'm try to set remote access (for using Dreamweaver) on a local network. I thought I had to set permission? a friend on the FreeBSD mailing list sent three different user accounts to set up: All Privileges(able to create DB and

RE: MYSQL Setup Question

2004-06-26 Thread Peter Lovatt
hi the error is because you have more or fewer items of data than fields or columns to put it in it is better practice to include fields in your query INSERT INTO sometable ( field1 , field2 , field3 ) VALUES

MYSQL Setup Question

2004-06-26 Thread Leon Ellis
I am brand new to MySQL Running MYSQL 4.0.16 on FreeBSD. When I try to add a user, with the following code I get an error. INSERT INTO user VALUES ('localhost','username',password('Secret'), 'Y','Y',...); I have used inwhere from 6 'Y's (Friends Recommendation) to 14 'y's MYSQL manual. I get the fo

Re: error 27

2004-06-26 Thread J S
Even the ALTER gave me an error! mysql> alter table internet_usage change uid uid char(10); ERROR 1030: Got error 127 from table handler mysql> J S wrote: Thanks for your reply. I had to change the IP column to bigint because mysql was inserting the wrong value when it was just int. Are your ips

RE: Any MySQL + IBM Power CPU Hardware (pSeries, iSeries, JS20, B lade) Users?

2004-06-26 Thread Rafi Sheikh
Currently running MySQl on AIX 5.1, F40 -Original Message- From: Zak Greant [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 3:10 PM To: [EMAIL PROTECTED] Subject: Any MySQL + IBM Power CPU Hardware (pSeries, iSeries, JS20, Blade) Users? Greetings All! MySQL AB is interested in t