Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-29 Thread gory
SQL Anywhere docs says : Collation label Type Description 1251CYR ANSI Code Page 1251, Windows Cyrillic same DB and scripts works fine on windows i think it is a ODBC problem on Linux "Andrey Hristov" <[EMAIL PROTECTED]> wrote in message 00c801c1d651$47e06d70$0b01

[PHP-DB] Images on MySQL

2002-03-29 Thread Clever
Hi, I'm designing a site and I have to store a lot of images. Which is the best for speed? 1) Store all images on a MySQL table? 2) Save them on disk like normal files and only have pointers to them on the database? Thanks a lot Clever Anjos -- PHP Database Mailing List (http://www.php.net/) T

Re: [PHP-DB] Images on MySQL

2002-03-29 Thread Cannis
In my experience storing images on disk is simpler, easier and not messy. I wouldn't think of storing binaries in a MySQL table...It just doesn't seem right, but then again I have never tested this, only relied on my peers telling me "It's not right" ;) -Lasse - Original Message - From:

Re: [PHP-DB] Images on MySQL

2002-03-29 Thread Jason Wong
On Thursday 28 March 2002 19:35, Clever wrote: > Hi, > I'm designing a site and I have to store a lot of images. > Which is the best for speed? > 1) Store all images on a MySQL table? > 2) Save them on disk like normal files and only have pointers to them on > the database? 2) -- Jason Wong ->

[PHP-DB] Return the last record on database

2002-03-29 Thread Ron
My database has several records an ID is the primary key I want to diplay output using PHP to a table (no biggy) The problem for me is I just want the record of the database to be displayed!!! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

RE: [PHP-DB] Return the last record on database

2002-03-29 Thread Rick Emery
SELECT * FROM mytable ORDER BY some_field DESC LIMIT 1; -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 7:39 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Return the last record on database My database has several records an ID is the primary key I wan

[PHP-DB] Insert into command - PHP

2002-03-29 Thread Ethan J. Mings
Crafted from The Desk on location in the Quality Lab. Hello PHP, -- I'm using the mysql_query() function. I have 61 fields (e.g, '$fname','$lname'etc) to insert into the data table. No matter what I do, the data is not loaded into the table. I've tried smaller tables with less than 11 fields an

[PHP-DB] I LOVE PHP

2002-03-29 Thread Ron
I just wanted to say to everybody...I DO LOVE PHP AND MYSQLSWEETNESS!!! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Insert into command - PHP

2002-03-29 Thread Ron
\r should give you the return "Ethan J. Mings" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Crafted from The Desk on location in the Quality Lab. > Hello PHP, > -- > > I'm using the mysql_query() function. > I have 61 fields (e.g, '$fname','$lname'etc) to in

[PHP-DB] displaying info in a form

2002-03-29 Thread Natividad Castro
Hi to all, I'm trying to display data in a form, but for some reason I can display the entire value of every field that has more than two words in the text box. For example, if I want to display the name CASTRO TRUCKING, the text field only display the first word CASTRO. I tried to use the trim()

Re: [PHP-DB] Images on MySQL

2002-03-29 Thread Steve Cayford
I keep hearing this from people (not to store images in mysql), but I would like to hear a bit more about why. Mysql has blob fields, so it seems perfectly reasonable to use them, doesn't it? I'm storing some images in a database and what's attractive to me about it is that I can put the image

Re: [PHP-DB] displaying info in a form

2002-03-29 Thread biorn
I have come across this before. Make sure you put "" around the value field and then single quotes around the variable, ie. > > (NOTE: if this is an int value, you do not need to use the single quotes around $id) > > > > > > > HTH MB Natividad Castro <[EMAIL PROTECTED]> said: >

RE: [PHP-DB] Unknown column 'Test' in 'field list'

2002-03-29 Thread Jonathan Hilgeman
Even though this is solved, I should mention a method that I find to be personally easier to use when INSERTing records. Simply use the field=value method: INSERT INTO MyTable SET firstname='Joe', lastname='Bob', age=58; By doing it this way, you don't have to worry about matching up the number

[PHP-DB] Re: Images on MySQL

2002-03-29 Thread Luis R. Sales Glez.
Hi Steve & *: Based on my experience, not only for MySQL, but any Database, I think it's better to keep just links to images instead of keep them in the database. Some of the reasons are, for example, when you need to update an image, you don't need to touch the database, only change the file. A

[PHP-DB] Re: displaying info in a form

2002-03-29 Thread Luis R. Sales Glez.
Hi Natividad & *: Try to declare the input file as: instead of > Regards, -- Luis R. Sales Glez. Database Administrator Information Systems & Solutions Sony Latin America Inc. Mailto: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

RE: [PHP-DB] Insert into command - PHP

2002-03-29 Thread Jonathan Hilgeman
You can check to see if there were any insert errors by: print mysql_error(); ...after you have run the query. Give us the output and your query and we can help a bit more. - Jonathan -Original Message- From: Ethan J. Mings [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 6:34

Re: [PHP-DB] displaying info in a form

2002-03-29 Thread Paul Burney
on 3/29/02 10:54 AM, Natividad Castro at [EMAIL PROTECTED] appended the following bits to my mbox: > I'm trying to display data in a form, but for some reason I can display the > entire value of every field that has more than two words in the text box. > For example, if I want to display the name

RE: [PHP-DB] Re: displaying info in a form

2002-03-29 Thread Jonathan Hilgeman
People have already answered this question, but here are some additional tips. Always make sure you include the NAME attribute of an INPUT - otherwise it can cause some headaches when you try to get the submitted data on the next page. So: You can also shorten the echo/print statement down t

RE: Re[2]: [PHP-DB] Insert into command - PHP

2002-03-29 Thread Jonathan Hilgeman
Well first, I don't know if you copied and pasted directly from your file, but you're building your query in the variable $sql AFTER you run the query: mysql_query($sql) or die(msql_error()); $sql = "Insert into table ('$field1','$field2',,'$field61')"; It should be: $sql = "Insert in

Re[4]: [PHP-DB] Insert into command - PHP

2002-03-29 Thread Ethan J. Mings
PHP-DB Mailing List Hello Jonathan, -- Friday, March 29, 2002, 12:16:19 PM, you wrote: > It should be: > $sql = "Insert into table ('$field1','$field2',,'$field61')"; > mysql_query($sql) or die(msql_error()); Thanks that is helpful. > It's a little easier to read and understand. Note

[PHP-DB] Advanced. Optimizing querry performance on a huge db with over 2.5 million entries

2002-03-29 Thread Andy
Hi there, I used to work with a table containing over 2.5 million cities. This was verry slow even using indexes. So I did split the huge table into 250 tables named after their country. Example: gm_cities for the german city table. Now performance is ok, because my interface knows in which table

[PHP-DB] help with preg_replace for http://

2002-03-29 Thread Kevin Won
I'm writing a knowledgebase (basically a content management system) application where people are adding text via web forms then viewing this data on the web. standard bread-and-butter kind of stuff. of course people want to put in their hyperlinks in the page w/o having to do any sort of html

[PHP-DB] help with preg_replace for http://

2002-03-29 Thread Kevin Won
I'm writing a knowledgebase (basically a content management system) application where people are adding text via web forms then viewing this data on the web. standard bread-and-butter kind of stuff. of course people want to put in their hyperlinks in the page w/o having to do any sort of html

RE: [PHP-DB] help with preg_replace for http://

2002-03-29 Thread Jonathan Hilgeman
Just do a while loop: while(preg_match("/string to find unconverted links/", $TextBody)) { // preg_replace here } But make sure you're not doing this on the fly every time the page is viewed. That will take up an enormous amount of resources with lots of visitors. Just convert it and

[PHP-DB] Re: Advanced. Optimizing querry performance on a huge db with over 2.5 million entries

2002-03-29 Thread Lutz Brückner
Hi Andy, it is difficult to give you an advice without the knowing about how you are searching the database. But if you have to search through all entries, it was a bad decision to split them up into 250 tables. Some other hints: You are lost without an index, because mysql have to do a full ta

[PHP-DB] Re: Advanced. Optimizing querry performance on a huge db with over 2.5 million entries

2002-03-29 Thread Andy
thanx, I am gonna play with it Andy "Lutz Brückner" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Andy, > > it is difficult to give you an advice without the knowing about > how you are searching the database. But if you have to search > through al

Re: [PHP-DB] help with preg_replace for http://

2002-03-29 Thread Bill Morrow
On Fri, Mar 29, 2002 at 11:46:24AM -0800, Kevin Won wrote: > I'm writing a knowledgebase (basically a content management system) application >where people are adding text via web forms then viewing this data on the web. >standard bread-and-butter kind of stuff. > > of course people want to put

[PHP-DB] end of file

2002-03-29 Thread Natividad Castro
Hi to all, how can I handle when the recordset reach the last record? is it possible to use eof? e.g. if there is no more record, "do something" Thanks in advanced Nato -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] end of file

2002-03-29 Thread Rick Emery
while( $row = mysql_fetch_array($result) ) { } -Original Message- From: Natividad Castro [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 2:59 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] end of file Hi to all, how can I handle when the recordset reach the last record? is it possib

Re: [PHP-DB] end of file

2002-03-29 Thread Clever
It's simple. The mysql_fetch_array($result) function will return a "false" value. example : if ( !mysql_fetch_array($result) ) { // Then do what u want } - Original Message - From: "Natividad Castro" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 29, 2002 5:58 PM Subjec

[PHP-DB] Uploading a file

2002-03-29 Thread Clever
Hi, I want to upload a file to the server using a form. Instead of using a text input, i'd like to open an Internet Explorer window, (that one that apears when you click on File/Open). I already have the code to copy the file. I only want a way to select from local files. How do this? Thanks -

[PHP-DB] RE: Images on MySQL

2002-03-29 Thread Andrew Chase
The kneejerk response always seems to be #2, store images in the filesystem and store their paths in the database. I like to compromise: store the original image in a dedicated "image data" table in the database (keep a separate table for image meta data (date/title/category/whatever) for faster

[PHP-DB] Problem with PHP connectivity with mySQL (RedHat package)

2002-03-29 Thread Saulo Silva
Hi everybody I can't get PHP to work with mySQL. I'm using PHP as an Apache module (RedHat) and the error message I get is the following message: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/other/test.php on line 10 I've tried to recompile PHP with mySQL support an

Re: [PHP-DB] Problem with PHP connectivity with mySQL (RedHat package)

2002-03-29 Thread Jason Wong
On Saturday 30 March 2002 10:42, Saulo Silva wrote: > Hi everybody > > I can't get PHP to work with mySQL. I'm using PHP as an Apache module > (RedHat) and the error message I get is the following message: Are both apache & php installed from RedHat rpms? > Fatal error: Call to undefined functio

Re: [PHP-DB] Uploading a file

2002-03-29 Thread Jason Wong
On Friday 29 March 2002 09:58, Clever wrote: > Hi, > I want to upload a file to the server using a form. > Instead of using a text input, i'd like to open an Internet Explorer > window, (that one that apears when you click on File/Open). > I already have the code to copy the file. > I only want a