[PHP-DB] Re: mysql -- Commercial DBs, When will I need to upgrade?
On Thu, 19 Apr 2001, Doug Schasteen wrote: snip 1. At what point will mysql blow up (how many tests could be taken at once? How many rows of results could be stored in a table before it bogs down?) MySQL will not blow up because of large amounts of data. Provided your database design and indexing is sound, MySQL should scale perfectly well in that respect. When it comes to traffic, simultaneous connections and queries, it all depeds on your application. From what you describe of it, it sounds like during a test, queries could be separated so that UPDATE/INSERT statements go to separate tables which are not being SELECTED from much in the course of the test. If that's correct, MySQL is probably the best database solution you could find for your application. 2. At what point will we need a dedicated server instead of shared-hosting? That depends on the shared hosting provider, but my experience is that many are very quick to cut you off without warning when you start taking too much system resources. Keep a dialog open with your provider if you can, try to keep updated on how much of a load your application is placing on the server, and ask them straight out how much more they will take. 3. How fast of a server do we need? Will a 1ghz server outperform a 500mhz server when using apache-php-mysql? Silly question, of course it will. But it sounds to me like your application should do well on a 500mhz server. 4. If we need a new database, what is the next step above mysql? I have some experience with Oracle but it is too expensive. Is there anything inbetween that is friendly to PHP? If, contrary to my assumptions above, your application requires many UPDATES to the same tables which are being SELECTED from during a period of high load (during the test), then your next step would be PostgreSQL, which is also open-source and free. It uses a different locking method, which handles those cases better, and has a general reputation of being slightly more robust than MySQL. 5. If MS-SQL is an option for a database-upgrade. What are the implications of switching our server to a win32-based server? Will we have problems with PHP on windows when all of our scripts were programmed for unix? MS-SQL is not an option. Stay with a UNIX-based system. snip Hope this helps, Jon Valvatne Viventus AS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] MS-SQL Server on PHP4/Apache/Linux
Hello, I currently use PHP4/IIS to access a MS-SQLServer 7.0 with mssql_* functions (php_mssql70.dll extension). I plan to move my website on PHP4/Apache/Linux, and I am wondering if thoses functions will work and how, as I didn't find any explanations on it in documentation. Thanks. = Manuel Prieur - Responsable Technique Vocal One - Groupe Néocom - 71 Boulevard de Brandebourg 94854 Ivry sur Seine - Cedex France - Tél : + 33 1 45 15 20 00 - Poste 3038 Fax : + 33 1 45 15 20 01 Mail : [EMAIL PROTECTED] = -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] MS-SQL Server on PHP4/Apache/Linux
I currently use PHP4/IIS to access a MS-SQLServer 7.0 with mssql_* functions (php_mssql70.dll extension). I plan to move my website on PHP4/Apache/Linux, and I am wondering if thoses functions will work and how, as I didn't find any explanations on it in documentation. I think the functions could work very well, but they will be totally useless since it does not exist a linux client for Ms-Sql. Porting your app to linux will require also the use of a different backend (I hope you used a DB abstraction layer). If this is not feasible, your only choice to access to MS-Sql from linux is using an ODBC client ported to linux (but you will have to chenage your code as well). You will find them easily on the list archive, I don't remember well the names and I don't want to give you a wrong link. HTH, bye /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini Alternate E-mail: C.so Umberto, 7 [EMAIL PROTECTED] loc. Meleto Valdarno Mail on GSM: (keep it short!) 52020 Cavriglia (AR) [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Designing a database
I want to thank *everyone* that sent me a reply on this matter. Trouble is you guys' messages were so good that I have to study the suckers first before I know if I need to ask for further clarification. So I might be back in a couple of days ;) Thanks a bunch, guys! Later -- -duke Calgary, Alberta, Canada -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] How I can use multiple results in MySQL
Hello, I'm cann't using query to MySQL like this: SELECT name FROM cia WHERE region = (SELECT region FROM table WHERE name = 'Brazil'); And SELECT name FROM table WHERE count = (SELECT max(count) FROM table); I want to select COLUMN_NAME in TABLE where ID is max, how I can do it? -- Best regards, Yevgeny mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] How I can use multiple results in MySQL
-Original Message- From: Yevgeny Dyatlov [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 8:05 AM To: PHP-DB Subject: [PHP-DB] How I can use multiple results in MySQL I'm cann't using query to MySQL like this: SELECT name FROM cia WHERE region = (SELECT region FROM table WHERE name = 'Brazil'); And SELECT name FROM table WHERE count = (SELECT max(count) FROM table); I want to select COLUMN_NAME in TABLE where ID is max, how I can do it? MySQL doesn't support sub-selects. However, in many cases you can get the same result by either reorganizing your queries or creating a temporary table. For more info, see http://www.mysql.com/doc/M/i/Missing_Sub-selects.html For example, your first query, rearranged to use joins, might wind up looking something like SELECT cia.name FROM cia, table WHERE cia.region = table.region AND table.name='Brazil' For the second, I'd do something like SELECT name FROM table ORDER BY count DESC LIMIT 1 --- Mark Roedel ([EMAIL PROTECTED]) || There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full. LeTourneau University ||-- Henry Kissinger -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How I can use multiple results in MySQL
SELECT name FROM cia WHERE region = (SELECT region FROM table WHERE name = 'Brazil'); would be: SELECT cia.name FROM cia, table WHERE cia.region=table.region AND table.name='Brazil' SELECT name FROM table WHERE count = (SELECT max(count) FROM table); if there may be more than one record having maximum value, you will have to run two separate queries Sigitas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Supplied argument is not a valid MySQL result resource...
-Original Message- From: Klaus Haberkorn [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 21, 2001 6:18 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Supplied argument is not a valid MySQL result resource... Looks like many reasons cause this error-message, but I cannot find a problem in the Query: ie.: $db_handle = mysql_connect(localhost, mysql, mysql); if($db_handle) { $result = mysql_db_query(mysql, select * from user, $db_handle); if($result = TRUE) if ($result == TRUE) --- Mark Roedel ([EMAIL PROTECTED]) || There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full. LeTourneau University ||-- Henry Kissinger -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Can't connect to local MySQL server through socket '/tmp/mysql.sock'
At 09:35 24-4-01 -0400, franky wrote: I have this error Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) take a look in this lists archive. THis question has been answered over and over and over.. Bye, B. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] calling a column into a popup
That's almost it. I want to populate the menu automatically from the database without having to manually modify the HTML. I believe the below will pull the data but it doesn't modify the menu in HTML. I tried a few things like using the variable name as the same as the co_name but the menu always comes up blank unless I put an option name in the list. it doesn't pass the variable for $co_name in the HTML. thanks, boo From: Johannes Janson [EMAIL PROTECTED] Date: Sun, 22 Apr 2001 21:49:36 +0200 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] calling a column into a popup Hi, let me get this right. What I understood is the following: 1. Your admin page where you enter the information of a company 2. A Page with a drop-down list where all the company names are listed. (These names should then be linked to an information page with more info?) 3. A page where new companies can be added. well the drop-down list you can do with a simple while and a select(html) like this: $result = mysql_query(SELECT companyName FROM companyTable ORDER BY companyName); echo select name=company; while (list($c_name) = mysql_fetch_array($result)) { echo option name=$c_name]$c_name/option; } If this is what you want (what I'm not sure about) I'm glad I understood you. If not supply more detailed information. Cheers Johannes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] calling a column into a popup
becky the code below is spot on (nearly) stick it on a form that calls itself change the option name= to option value= and when you refresh the form $company will contain the comany name. you can also use selected in the folowing manner $regs = pg_Exec($conn, select region_id, region_name from region where .$depdisplay. is not null order by .$depdisplay. ); $numregs = pg_numrows($regs); echo 'nbsp;Regionnbsp;nbsp;select name=reg onChange=document.thisForm.submit()'; echo 'option value=0Choose a Region/option'; for ($s=0; $s$numregs; $s++) { $reglist = pg_fetch_array($regs,$s); echo'option value='.$reglist[region_name].''; print ($region == $reglist[region_name]) ? SELECTED: ; echo ''.$reglist[region_name].'/option'; } echo'/select'; -Original Message- From: Beckie Pack [mailto:[EMAIL PROTECTED]] Sent: 23 April 2001 15:29 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] calling a column into a popup That's almost it. I want to populate the menu automatically from the database without having to manually modify the HTML. I believe the below will pull the data but it doesn't modify the menu in HTML. I tried a few things like using the variable name as the same as the co_name but the menu always comes up blank unless I put an option name in the list. it doesn't pass the variable for $co_name in the HTML. thanks, boo From: Johannes Janson [EMAIL PROTECTED] Date: Sun, 22 Apr 2001 21:49:36 +0200 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] calling a column into a popup Hi, let me get this right. What I understood is the following: 1. Your admin page where you enter the information of a company 2. A Page with a drop-down list where all the company names are listed. (These names should then be linked to an information page with more info?) 3. A page where new companies can be added. well the drop-down list you can do with a simple while and a select(html) like this: $result = mysql_query(SELECT companyName FROM companyTable ORDER BY companyName); echo select name=company; while (list($c_name) = mysql_fetch_array($result)) { echo option name=$c_name]$c_name/option; } If this is what you want (what I'm not sure about) I'm glad I understood you. If not supply more detailed information. Cheers Johannes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] calling a column into a popup
So a certain company is previously selected? And then you want to populate the form with the info of the company? to do this link the menu with a onChange action to a display page. But I'm not sure if I get the layout. Could you describe it again? Cheers Johannes Beckie Pack [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... That's almost it. I want to populate the menu automatically from the database without having to manually modify the HTML. I believe the below will pull the data but it doesn't modify the menu in HTML. I tried a few things like using the variable name as the same as the co_name but the menu always comes up blank unless I put an option name in the list. it doesn't pass the variable for $co_name in the HTML. thanks, boo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Problem with session vars !
It not related to database. Anyway, If you use $HTTP_SESSION_VARS, forget about session_(un)register(). (Do not use them) Just use $HTTP_SESSION_VARS. It's known issue. (If you use global vars, only use global vars and use session_(un)register()) Regards, -- Yasuo Ohgaki Nicolas Guilhot [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am having problem with PHP4 session variables. I think I misunderstood how they work, and I can't see what I'm doing wrong. Any help would be appreciated. I am using the version from EasyPhp 1.1.1. Below is a short example to explain my problem. I've got two php scripts. 'test1.php' which start a session, set a variable $sess and register it as a session variable. It then redirects to 'test2.php' which only displays session variables and switches $sess[var1] between true and false on each call. With the code in example, I retrieve the variable set by 'test1.php' on 'test2.php', but $HTTP_SESSION_VARS['sess']['var1'] is always true. With the same code, If I set register_globals to off in my php.ini, I get the opposite. I never retrieve the variable set by 'test1.php' on 'test2.php', but $HTTP_SESSION_VARS['sess']['var1'] is switches correctly. What is wrong in this code ?? If I replace session_register('sess'); in 'test1.php' by $GLOBALS['HTTP_SESSION_VARS']['sess'] = $sess; and set register_globals to off everything works. Someone could explain to me why ?? Best regards, Nicolas File test1.php ? function initSessionVar() { global $sess; // initialise sess variable for the new session $sess = array(); $sess['user'] = test; $sess['var1'] = true; session_register('sess'); } session_start(); initSessionVar(); header('Location: http://localhost/test2.php'); exit; ? File test2.php ? session_start(); echo gettype($HTTP_SESSION_VARS['sess']) . BR; echo $HTTP_SESSION_VARS['sess']['user'] . BR; echo ($HTTP_SESSION_VARS['sess']['var1'] ? true : false); if ($HTTP_SESSION_VARS['sess']['var1']){ $HTTP_SESSION_VARS['sess']['var1'] = false; } else{ $HTTP_SESSION_VARS['sess']['var1'] = true; } ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] calling a column into a popup
yup, now i realize it is a form calling itself with a php doc. i feel like a dufus(sp?). i didn't recognize the echo as opposed to print so I didn't see the html coming. learning php, mysql, and database design all together. it's kinda fun, given time for a project you know. thanks to both of you. beckie From: Steve Brett [EMAIL PROTECTED] Date: Mon, 23 Apr 2001 16:02:02 +0100 To: Beckie Pack [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP-DB] calling a column into a popup becky the code below is spot on (nearly) stick it on a form that calls itself change the option name= to option value= and when you refresh the form $company will contain the comany name. you can also use selected in the folowing manner $regs = pg_Exec($conn, select region_id, region_name from region where .$depdisplay. is not null order by .$depdisplay. ); $numregs = pg_numrows($regs); echo 'nbsp;Regionnbsp;nbsp;select name=reg onChange=document.thisForm.submit()'; echo 'option value=0Choose a Region/option'; for ($s=0; $s$numregs; $s++) { $reglist = pg_fetch_array($regs,$s); echo'option value='.$reglist[region_name].''; print ($region == $reglist[region_name]) ? SELECTED: ; echo ''.$reglist[region_name].'/option'; } echo'/select'; -Original Message- From: Beckie Pack [mailto:[EMAIL PROTECTED]] Sent: 23 April 2001 15:29 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] calling a column into a popup That's almost it. I want to populate the menu automatically from the database without having to manually modify the HTML. I believe the below will pull the data but it doesn't modify the menu in HTML. I tried a few things like using the variable name as the same as the co_name but the menu always comes up blank unless I put an option name in the list. it doesn't pass the variable for $co_name in the HTML. thanks, boo From: Johannes Janson [EMAIL PROTECTED] Date: Sun, 22 Apr 2001 21:49:36 +0200 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] calling a column into a popup Hi, let me get this right. What I understood is the following: 1. Your admin page where you enter the information of a company 2. A Page with a drop-down list where all the company names are listed. (These names should then be linked to an information page with more info?) 3. A page where new companies can be added. well the drop-down list you can do with a simple while and a select(html) like this: $result = mysql_query(SELECT companyName FROM companyTable ORDER BY companyName); echo select name=company; while (list($c_name) = mysql_fetch_array($result)) { echo option name=$c_name]$c_name/option; } If this is what you want (what I'm not sure about) I'm glad I understood you. If not supply more detailed information. Cheers Johannes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] PostgreSQL7.1: It's worth to upgrade.
Hello PostgreSQL users, I'm testing PostgreSQL 7.1 and PHP4.0.4pl1 on Linux. It's really worth to upgrade. Besides PostgreSQL 7.1 supports any size of text, WAL, many bug fixes, better pg_dump/restore, etc. PostgreSQL 7.1 can provide more backends on the same box. A box, which could set to max 70 or less backends, can set upto 3000+ backends. The box would not be able to handle 3000 db connections, but it is really nice to have more db connections for web applications. 7.1 also seems much faster than 7.0.3. Text type with large data can consume a lot of CPU time. BLOB is suitable to store really large data. If you are using Windows, you are better to stay with 7.0. You will see error message with pg_errormessage() even if there is no errors. Wait or compile php_pgsql.dll with 7.1 libpq. (I don't have environment to compile it. If anyone has php_pgsql.dll with 7.1 libpq for PHP4.0.4pl1, could you tell where to get or send it to me?) -- Yasuo Ohgaki -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Insert Variables Into A Passed String
Hey, I'm trying to figure out how to make a custom message. What I have is a form with a TEXTAREA named MAILFROM. I want to be able to write an e-mail in that section like so: Dear $username. When I press submit, I want the query to cycle through a list of names (got this part) and where it finds the variables in the text, replaces them with the proper content. Like: Dear steven How can I do something like this? Thanks. Steven -Original Message- From: B. van Ouwerkerk [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 10:26 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] can't connect to mysql At 06:45 19-4-01 -0500, johndmiller wrote: I just looked at my mysql.sock file and it has a length of zero. Is this the right size, I don't think it is. If not, do I have to reinstall MySQL to get the file back or can I get it from somewhere else. Length of zero.. thats perfectly normal. Bye, B. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] trouble reading a database (fwd)
Below is the output and code for my problem. When the database gets read, it returns 0 rows. When it writes, it says it can't because of duplicate entry. FLD_FileName and FDL_Path are the Primary key. Two questions, what I am doing wrong and is there a better way to create a string of text then the one used below. TIA John Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = SailBoat.jpgand FLD_Path = /var/www/html/slidecollection/WinterCarnival Result of read Resource id #2 Error Results 0 Number or Rows 0 Insert Sql INSERT INTO TBL_Picture VALUES (SailBoat.jpg,/var/www/html/slidecollection/WinterCarnival, 1234,gfgfdgfddg,gfdgfd) Error Results Duplicate entry '/var/www/html/slidecollection/WinterCarnival-SailBoat.jpg' for key 1Result is of 2 is //reading the database to see if record already exists $result = mysql_select_db (Picture_DB, $link) or die (Could not get the database); $read_sql = SELECT * FROM TBL_Picture WHERE FLD_FileName = \; $read_sql .= $fn_FileName; $read_sql .= \and FLD_Path =\ ; $read_sql .= $fn_Path; $read_sql .= \; echo Read_sql ; echo $read_sql; $result = mysql_query($read_sql, $link) or die(could not read the table); echo Result of read ; echo $result; echo Error Results ; echo mysql_errno ($link); $number_of_rows = mysql_num_rows($result); echo Number or Rows ; echo $number_of_rows; //if return no rows then we need to add the record if ($number_of_rows == 0){ $insert_sql = INSERT INTO TBL_Picture VALUES (\; $insert_sql .= $fn_FileName; $insert_sql .= \,\; $insert_sql .= $fn_Path; $insert_sql .= \,\; $insert_sql .= $fn_Year; $insert_sql .= \,\; $insert_sql .= $fn_DescriptiveText; $insert_sql .= \,\; $insert_sql .= $fn_PictureName; $insert_sql .= \); echo Insert Sql ; echo $insert_sql; $result2 = mysql_query($insert_sql, $link); // or die(could not write to the table ); echo Error Results ; echo mysql_error ($link); echo Result is of 2 is; echo $result2; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] RE: [PHP] trouble reading a database (fwd)
-- Forwarded message -- Date: Mon, 23 Apr 2001 20:19:57 -0500 (CDT) From: johndmiller [EMAIL PROTECTED] To: Jason Murray [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] trouble reading a database (fwd) Thanks for the pointer about ' vs . I have changed my code to used these. The code is a lot cleaner. I am still getting a not found error. Below is the new cleaner messages that I display. One point that may be important, FLD_Name and FLD_Path are the primary key. Couple of questions, can I recreate the same key and use just one name (looks like I could) and would this help with the problem. Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = 'IceCastle.jpg' and FLD_Path = '/var/www/html/slidecollection/WinterCarnival' Error Results Result of read Resource id #2 Number or Rows 0 Insert Sql INSERT INTO TBL_Picture VALUES ('IceCastle.jpg', '/var/www/html/slidecollection/WinterCarnival', '1984', 'This is a picture of an Ice Castle at night.', 'Ice Castle') Error Results Duplicate entry '/var/www/html/slidecollection/WinterCarnival-IceCastle.jpg' for key 1 Can I set up my primary key On Tue, 24 Apr 2001, Jason Murray wrote: Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = SailBoat.jpgand FLD_Path = /var/www/html/slidecollection/WinterCarnival This is a little hideous. For one thing, you should probably use ' and not . It may not make a difference to MySQL, but it does to other databases you may use in the future. For the FLD_Path comparison, you are looking for something that specifically STARTS with a space. I'd bet this is why the script is getting 0 rows back - probably none of your FLD_Path's start with a space. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] db read
I am new a database stuff. I am using mysql 4.0.1 with php on RH7.0. I am setting up a db with three fields with no-one field being unique. Do I have to have a unique field? The purpose of this db is to store a word, name of a file, and path to the file. My plan is to use a where clause, but I am not sure if it would be more efficent to do WHERE field1=word and field2=filename and field3=path; or WHERE field1 = word and then read through the rows using something like a for each and check the other two fields. Thank in Advance John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] db read
Addressed to: johndmiller [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from johndmiller [EMAIL PROTECTED] Mon, 23 Apr 2001 20:37:49 -0500 (CDT) I am new a database stuff. I am using mysql 4.0.1 with php on RH7.0. I am setting up a db with three fields with no-one field being unique. Do I have to have a unique field? The purpose of this db is to store a word, name of a file, and path to the file. My plan is to use a where clause, but I am not sure if it would be more efficent to do WHERE field1=word and field2=filename and field3=path; or WHERE field1 = word and then read through the rows using something like a for each and check the other two fields. When in doubt, code it both ways and time them. In general, the more you can do in the database the better. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Need php page to upload files
Hi all, I need a basic php page to upload files containing information to later import them into my server. Can somebody point me to a simple site where I can get one? Thanks,
Re: [PHP-DB] Need php page to upload files
http://www.php.net/manual/en/features.file-upload.php On Mon, 23 Apr 2001, Hector M Banda wrote: Hi all, I need a basic php page to upload files containing information to later import them into my server. Can somebody point me to a simple site where I can get one? Thanks, -- .--- .- ... --- -. / -- --- .-. . --- ..- ... . Jason Morehouse [EMAIL PROTECTED] Netconcepts LTD Auckland, New Zealand -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Weird error connecting to Sybase
Hi all, I recently compiled Apache with PHP4 and have configured PHP4 to enable Sybase. I used FreeTDS for that. Everything compiled fine and the Apache server runs fine. I added the right info in the interfaces file and a program like sqsh runs fine. When I try to connect to a Sybase database through PHP4 I get the following error in Apache's error file: Unknown marker: 0!! DB-Library: Login incorrect. Has anyone ever seen this? Any idea what to do about it? Thanks. Paul -- Paul van GoolOpenwave Systems, Inc. [EMAIL PROTECTED] (805) 957-1790 x572 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Weird error connecting to Sybase
Sorry. My configuration was a bit messed up. I'm not Billy ;-). Thanks. Paul -- Paul van GoolOpenwave Systems, Inc. [EMAIL PROTECTED] (805) 957-1790 x572 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]