Re: [PHP-DB] Date display problem
How do I display the time and date on my message board depending on the time of the place from where the data is entered.Everytime the date that is displayed is not what it was when the message was posted. If you mean what I think you mean then you can use a TIMESTAMP fieldtype on the row where the date lies in your table. A MySQL TIMESATMP comes in the mmdd hh:mm:ss formate, and changes whenever that field ia altered or updated. Hope that is what you needed! Russ On Sat, 12 May 2001 18:27:36 + vipin chandran [EMAIL PROTECTED] wrote: Hi, How do I display the time and date on my message board depending on the time of the place from where the data is entered.Everytime the date that is displayed is not what it was when the message was posted. thanx, vipin chandran [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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.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]
Re: [PHP-DB] variable vaule lost
Maybe this is what you wanted: ? echo(FORM); $i=10; for ($j=0;$j3;$j++){ echo $j; echo(INPUT TYPE=checkbox NAME='$j' VALUE='$i'); } echo(input type=hidden name=passvar value=$i); echo(input type=submit name=Enter value=Enter); echo(/form); ? The value of '$i' can now be picked up by calling it from the new var: 'passvar' HTH :) Russ how The variable being passed will be seen in the next form? On Fri, 11 May 2001 01:55:42 +0530 Sharmad Naik [EMAIL PROTECTED] wrote: pls look at the attachment -- The secret of the universe is @*í!'ñ^#+ NO CARRIER ___ _ _ _ |_|_||_||_||\/||_|| \ _|| || || \| || ||_/ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.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] Help a newbie: Oracle8 Php4 Apache
Hi to everyone! I'd need to now how to compile (row by row) Php4 with Oracle8 under Linux. What do I need? I'm downloading Oracle8 and i have a tar.gz file with standard php4. Thanks a lot Miki PS with W2k I had no problem, now I'd like to see how it works with linux.
[PHP-DB] ertge
drfg -- 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] php - MSSQL
Hi there. Is there any possible way to connect PHP (running on apache 1.3.12 on Red Hat Linux 7) with Microsoft SQL server (running on Windows 2000) ? Dragan Dinic, Serbia -- 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] Oracle Database Class
Hi All I want to build a site using classes and was wondering is there an Oracle Database class that I can use instead of writing one from scratch. I don't want to use abstraction layers. Can aynone direct me to a place where I can dowload such a class definition? Neil Craig QEDI (Pty) Ltd -- 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] Newbie: IF statement
Hi, I have tried these if statements, but without luck: if ($Page='') { $Page=homepage } you use only one = So you assign or '' or null to $page. use if ($page == ) instead. hope it helps 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] Newbie: IF statement
You should be using '==' compare not '=' assignment Plus you can use the isset function to determine whether the $page variable has been set e.g. if (!isset($Page)) $Page=homepage; -Stewart -Original Message- From: Dan Eskildsen [mailto:[EMAIL PROTECTED]] Sent: 14 May 2001 11:24 To: [EMAIL PROTECTED] Subject: [PHP-DB] Newbie: IF statement MAJOR NEWBIE ALERT! I can't believe this! I can't even work out an IF statement! My page contains a search string (eg: page.php3?Page=products ) If the URL does not contain a search string (ie page.php3) then I want to assign the Page variable to 'homepage. I have tried these if statements, but without luck: if ($Page='') { $Page=homepage } if ($Page=) { $Page=homepage } if ($Page=null) { $Page=homepage } I tried the manual at http://www.php.net/manual/en/control-structures.php#control-structures.if but without luck. Any help?!?! == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- 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] Oracle Database Class
Hi, try this: http://php.weblogs.com/ADODB Jarek Neil wrote: Hi All I want to build a site using classes and was wondering is there an Oracle Database class that I can use instead of writing one from scratch. I don't want to use abstraction layers. Can aynone direct me to a place where I can dowload such a class definition? Neil Craig QEDI (Pty) Ltd -- 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] Oracle Database Class
On Mon, May 14, 2001 at 02:19:42PM +0200, jarek wrote: Hi, try this: http://php.weblogs.com/ADODB the PEAR db-abstraction also supports oracle as a database! tc Jarek Neil wrote: Hi All I want to build a site using classes and was wondering is there an Oracle Database class that I can use instead of writing one from scratch. I don't want to use abstraction layers. Can aynone direct me to a place where I can dowload such a class definition? Neil Craig QEDI (Pty) Ltd -- 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 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] Printing out usernames and logins
¥es, U R overwriting Ur result-set from the 1st qry. Store instead the 1st result into an array and iterate it then, sending your second select. U can also use 2 connections, but ... ? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 7:35 PM To: PHP DB List; PHP General List Subject: [PHP-DB] Printing out usernames and logins Hi, I'm trying to print out a list of usernames and the times they logged in. I want to print it out like: joe fred frank Then when you click on one of the names it show just there login times, like this, so if I click on fred it prints out: joe fred - login time - login time - login time frank But it doesn't continue printing out the rest of the usernames after it's finished printing freds logins. Any ideas would be appreciated. The code seems to have something to do with the second query, I think The code I'm using is below. Thanks, Jord db_connect(); $sql = SELECT id, username FROM users; $result = @mysql_query($sql); if(@mysql_num_rows($result) 0) { echo'This is a list of Members who have Logged In to their account with times and dates:BRBR'; while(list($id, $username) = mysql_fetch_array($result)) { echoA HREF=\$PHP_SELF?user=$usernameid=$id\$username/ABR\n; if($username == $user) { $sql = SELECT UNIX_TIMESTAMP(time) AS time FROM user_logins WHERE user_id = $id ORDER BY time DESC; $result = @mysql_query($sql); while(list($time) = mysql_fetch_array($result)) { echo date('h:i a l d F', $time).BR\n; } } } } else { echo error('No one has Logged In yet!'); } -- 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] Performance of Stored Procedures ?
Hi, i've just made some simple test with oracle and stored procedures. I've used a simple select-statement within the stored procedure and the same query for a direct query within php. The direct query was about 50% faster. Is that normal? Will the stored procedures become faster with more complex queries? Any comments welcome Robert -- 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] Performance of Stored Procedures ?
On Mon, May 14, 2001 at 02:52:01PM +0200, Robert Boehrs wrote: Hi, i've just made some simple test with oracle and stored procedures. I've used a simple select-statement within the stored procedure and the same query for a direct query within php. The direct query was about 50% faster. Is that normal? Will the stored procedures become faster with more complex queries? this pretty much depends on the code you write. could you send me the code you used for your little benchmark - so i could have a loot at it? tc -- 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] php - MSSQL
On Mon, May 14, 2001 at 12:11:17PM +0200, Dragan Dinic wrote: Hi there. Hi. Is there any possible way to connect PHP (running on apache 1.3.12 on Red Hat Linux 7) with Microsoft SQL server (running on Windows 2000) ? Yes -- Jason Stechschulte [EMAIL PROTECTED] -- Perl itself is usually pretty good about telling you what you shouldn't do. :-) -- Larry Wall in [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]
Odp: [PHP-DB] Performance of Stored Procedures ?
Od: "Robert Boehrs" [EMAIL PROTECTED] Temat: [PHP-DB] Performance of Stored Procedures ? i've just made some simple test with oracle and stored procedures. I've used a simple select-statement within the stored procedure and the same query for a direct query within php. The direct query was about 50% faster. Is that normal? Will the stored procedures become faster with more complex queries? Most of performance benefit you will get when performing complex computations on data, such calculating taxes, rebates and other things. Selects are not too good examples. Cheers Jarek Zgoda -- 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] Performance of Stored Procedures ?
Well tuned (using appropriate indexes and following a good execution plan) Queries work faster than procedures. If the query involves mathematical computation or operations such as substr, concatenations, then a PL/SQL procedure works better. It all depends what the quey is doing. Lokesh Thies C. Arntzen wrote: On Mon, May 14, 2001 at 02:52:01PM +0200, Robert Boehrs wrote: Hi, i've just made some simple test with oracle and stored procedures. I've used a simple select-statement within the stored procedure and the same query for a direct query within php. The direct query was about 50% faster. Is that normal? Will the stored procedures become faster with more complex queries? this pretty much depends on the code you write. could you send me the code you used for your little benchmark - so i could have a loot at it? tc -- 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] Image and Mysql capabilities
Hi list Members, I have a real doubt regarding the storage of images in the My sql database. Anyone know the alternatives to manipulate the insert and query with images? Well, let me explain...I have a lot of images that correspond to some cars names. I want, everytime a user select the respective car, to bring the respective car image with the informations of that car. I was reading about mysql, and found that it don't store images in the fields, but we can create a BLOB field and store it in binary. But, I'm afraid of the performance of the DB, cause sometimes you have thousands os images, and I know that it will occupy a lot of space!...So, I thought about putting a reference path to that image!...And print this path in a img tag...What do you think about it? Thanks 4 your attention, Regards, Felipe Moreno -Mensagem original- De: Mark Roedel [mailto:[EMAIL PROTECTED]] Enviada em: segunda-feira, 14 de maio de 2001 10:51 Para: Dragan Dinic; [EMAIL PROTECTED] Assunto: RE: [PHP-DB] php - MSSQL -Original Message- From: Dragan Dinic [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 5:11 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] php - MSSQL Is there any possible way to connect PHP (running on apache 1.3.12 on Red Hat Linux 7) with Microsoft SQL server (running on Windows 2000) ? Yep. As someone else has noted, the ODBC functions are one way. Another way, particularly if you prefer to talk to the database directly rather than through a translation layer, is to install the FreeTDS libraries (http://www.freetds.org/) on your Linux machine and then build PHP with the --with-sybase configuration parameter. This will enable the mssql_* functions. --- 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] -- 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] Image and Mysql capabilities
Hi, I've been using those references to images on the filesystem for 2 years now. What I experience, is that I have dead references, that means that I do have files on disk that don't exist in the database, and vica versa. Three weeks ago, I rewrote one part to see how things work if I store the images in MySQL. The 'broken reference' thing has been solved. Performance is ok if you don't do select *, but just select the columns you need (so don't select the blob if you dont need it). It works pretty good, place an index on the filename (or the ID), that's what you use mostly. It works good to, but if there are reasons not to use it, I can still 'undo' the change, so let me know! Regards, Harmen. Felipe Moreno [EMAIL PROTECTED] on 05/14/2001 04:46:10 PM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] Image and Mysql capabilities Hi list Members, I have a real doubt regarding the storage of images in the My sql database. Anyone know the alternatives to manipulate the insert and query with images? Well, let me explain...I have a lot of images that correspond to some cars names. I want, everytime a user select the respective car, to bring the respective car image with the informations of that car. I was reading about mysql, and found that it don't store images in the fields, but we can create a BLOB field and store it in binary. But, I'm afraid of the performance of the DB, cause sometimes you have thousands os images, and I know that it will occupy a lot of space!...So, I thought about putting a reference path to that image!...And print this path in a img tag...What do you think about it? Thanks 4 your attention, Regards, Felipe Moreno -Mensagem original- De: Mark Roedel [mailto:[EMAIL PROTECTED]] Enviada em: segunda-feira, 14 de maio de 2001 10:51 Para: Dragan Dinic; [EMAIL PROTECTED] Assunto: RE: [PHP-DB] php - MSSQL -Original Message- From: Dragan Dinic [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 5:11 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] php - MSSQL Is there any possible way to connect PHP (running on apache 1.3.12 on Red Hat Linux 7) with Microsoft SQL server (running on Windows 2000) ? Yep. As someone else has noted, the ODBC functions are one way. Another way, particularly if you prefer to talk to the database directly rather than through a translation layer, is to install the FreeTDS libraries (http://www.freetds.org/) on your Linux machine and then build PHP with the --with-sybase configuration parameter. This will enable the mssql_* functions. --- 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] -- 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] Image and Mysql capabilities
In Oracle reports, this strategy is used (storing the path of the image file in the DB and storing the actual image file in the OS) to display images and for the same reason - performance of the DB. I think it is good approach. Lokesh Felipe Moreno wrote: Hi list Members, I have a real doubt regarding the storage of images in the My sql database. Anyone know the alternatives to manipulate the insert and query with images? Well, let me explain...I have a lot of images that correspond to some cars names. I want, everytime a user select the respective car, to bring the respective car image with the informations of that car. I was reading about mysql, and found that it don't store images in the fields, but we can create a BLOB field and store it in binary. But, I'm afraid of the performance of the DB, cause sometimes you have thousands os images, and I know that it will occupy a lot of space!...So, I thought about putting a reference path to that image!...And print this path in a img tag...What do you think about it? Thanks 4 your attention, Regards, Felipe Moreno -Mensagem original- De: Mark Roedel [mailto:[EMAIL PROTECTED]] Enviada em: segunda-feira, 14 de maio de 2001 10:51 Para: Dragan Dinic; [EMAIL PROTECTED] Assunto: RE: [PHP-DB] php - MSSQL -Original Message- From: Dragan Dinic [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 5:11 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] php - MSSQL Is there any possible way to connect PHP (running on apache 1.3.12 on Red Hat Linux 7) with Microsoft SQL server (running on Windows 2000) ? Yep. As someone else has noted, the ODBC functions are one way. Another way, particularly if you prefer to talk to the database directly rather than through a translation layer, is to install the FreeTDS libraries (http://www.freetds.org/) on your Linux machine and then build PHP with the --with-sybase configuration parameter. This will enable the mssql_* functions. --- 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] -- 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] Strange MySQL problem with multiple consequent inserts
At 05:56 PM 5/14/01 +0200, Stefano Bizzi wrote: $result = mysql_query (INSERT INTO Ordini (ORDERID, DATA, RAGSOC, INDIRIZZO, CAP, CITTA, PROVINCIA, NAZIONE, EU, TELEFONO, FAX, EMAIL, ICQUIN, PARTITAIVA, MODPAGAMENTO, IP) VALUES ('$ORDERID', $DATA', You're missing the opening single quote on $DATA ^^^ '$RAGIONESOCIALE', '$INDIRIZZO', '$CAP', '$CITTA', '$PV', 'IT', 1, '$TELEFONO', '$FAX', '$EMAIL', '$ICQUIN', '$PIVACFISC', '$PAYMENT', '$CURRENTIP'), $db) or die (wrong query : . mysql_error()); print BROrdini Table : Insert ID : . mysql_insert_id(); print BRResult : $resultBR; foreach ($dettaglio as $elemento) { $parti = explode(|, $elemento); $result = mysql_query (INSERT INTO Dettaglio (ORDERID, PARTID, DESCRIZIONE, PREZZOIE, ALIVA) VALUES ('$ORDERID', '$parti[0]', '$parti[1]', '$parti[2]', '20'), $db) or die (mysql_error()); print BRDetail Table - Insert ID : . mysql_insert_id(); print BRResult : $resultBR; } is supposed to add several records to my MySQL table. As you notice, it is written to add a first record (order record) and a subset of records realted to that order (in the foreach cycle). I tried with 1 order and 5 details, and add OR the order OR the details (always all the detail records are added in this case)... never both together. The strange thing is that the output to the browser is the following: Ordini Table : Insert ID : 0 Result : 1 Detail Table - Insert ID : 1 Result : 1 Detail Table - Insert ID : 2 Result : 1 Detail Table - Insert ID : 3 Result : 1 Detail Table - Insert ID : 4 Result : 1 Detail Table - Insert ID : 5 Result : 1 So, from what i can understand, the queries are issued correctly (result is always true) and also the insert_id is updated correctly. What could cause the random insert of the records? Thanks in advance for any suggestion :) Stefano -- 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] - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 [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] ODBC returns correct # of rows, but no data?
I have a MSSQL server running on WinNT, and I am trying to issue queries to it from my Linux 2.2.17 system using ODBC. I have installed unixODBC and the FreeTDS driver, and with this combination I am able to send queries from a command line client succesfully. In particular, when I execute the query in the PHP script below, I get exactly 593 rows, as expected. When I execute the script below, I count the number of rows inside the loop, and print it out after displaying the HTML table containing all of the rows. The number of rows is 593, as expected. However, the table is blank! No data was printed! Viewing the source shows 593 copies of: TR TD/TD TD/TD /TR What gives? The query is obviously executing, and is returning the right number of rows, but it isn't giving me the row data. To make things worse, about 1 in 5 runs of this script returns Document contains no data and the following line in the error_log: [Mon May 14 12:24:16 2001] [notice] child pid 14627 exit signal Segmentation fault (11) FATAL: emalloc(): Unable to allocate 137579345 bytes Here is the script. It is a simple script to test the ODBC functions. It executes a two-column SELECT and displays the result in a table. It does not seem to matter whether I pass the field names or the column position to the odbc_result() function. Both return blank (). ? $db = odbc_connect(TEST,,); if(!$db) { echo odbc_connect() failed\n; exit; } $handle = odbc_prepare($db,SELECT acctid,company FROM account); if(!$handle) { echo odbc_prepare() failed\n; exit; } if(!odbc_execute($handle)) { echo odbc_execute() failed\n; exit; } ? TABLE BORDER !-- This row comes out blank, also. -- TR TD? echo htmlspecialchars($c1 = odbc_field_name($handle,1)) ?/TD TD? echo htmlspecialchars($c2 = odbc_field_name($handle,2)) ?/TD /TR ? } while(odbc_fetch_row($handle)) { $c++; $k = odbc_result($handle,1); $v = odbc_result($handle,2); ? TR TD? echo htmlspecialchars($k) ?/TD TD? echo htmlspecialchars($v) ?/TD /TR ? } echo /TABLE\n; odbc_free_result($handle); odbc_close($db); ? HR ? echo $c ? rows. PGP signature
[PHP-DB] Url link
Hey there, I'm trying to build NEXT/PREV buttons on my search page. The only way I know to do it so far is via an url. So the link I create is the following: http://monster/search1.php?offset=0submit=submittedwhere=historical_yn%3D% 27N%27+and+fname+like+%27%25%25%27+and+lname+like+%27%25%25%27+and+dept+like +%27%2510%25%27+and+locid+like+%27%25%25%27+ I'm passing the where= portion as a variable to my query string. $query = select blah from employee where $where order by blah limit blah But it makes the where section into this: select id, lname, fname, extension, locid, email from employee where historical_yn=\'N\' and fname like \'%%\' and lname like \'%%\' and dept like \'%10%\' and locid like \'%%\' order by lname limit 1,20 The problem is it's putting \'s in the where variable and it makes the query fail. Does anyone know how best to get rid of the \'s or a better way to do next/prev buttons? Thanks!!! Mark -- 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] Url link
Hi Mark, Try this code for your delight: http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html Regards, Roel Mulder At 16:02 14-05-2001 -0400, you wrote: Hey there, I'm trying to build NEXT/PREV buttons on my search page. The only way I know to do it so far is via an url. 8 8 8 8 Does anyone know how best to get rid of the \'s or a better way to do next/prev buttons? Thanks!!! Mark Mulder Technisch Advies Postbus 69 NL-2740 AB WADDINXVEEN tel. 0182-640184 fax. 0182-640185 http://www.mta.nl -- 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] Url link
Anyone know how to get the connecting client's ip address using php? I need to log this information to a db for security reasons Thanks Robert Staph, W3RCS The Center for Advanced Technologies - Original Message - From: Roel Mulder [EMAIL PROTECTED] To: Mark McCray [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, May 14, 2001 4:51 PM Subject: Re: [PHP-DB] Url link Hi Mark, Try this code for your delight: http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html Regards, Roel Mulder At 16:02 14-05-2001 -0400, you wrote: Hey there, I'm trying to build NEXT/PREV buttons on my search page. The only way I know to do it so far is via an url. 8 8 8 8 Does anyone know how best to get rid of the \'s or a better way to do next/prev buttons? Thanks!!! Mark Mulder Technisch Advies Postbus 69 NL-2740 AB WADDINXVEEN tel. 0182-640184 fax. 0182-640185 http://www.mta.nl -- 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] Flash+PHP search error
I am currently in the progress of setting up a page for my client located at http://64.77.185.160/main.html which integrates a PHP search function to find keywords on a page. The problem I am running into now is when I goto that main.html page, I get this \n, $header); } } ? message above my Flash movie and have no idea why it is causing it on the Unix server with PHP 4.05. The thing is the PHP search and the Flash movie work fine for searches even with that message, its just that I'm looking for a way to remove it. The funny thing about it is it shows up only on IE and Netscape 6 for the PC/Mac but Netscape 4.76 doesn't show that text. weird. P.S. If you notice the Search Results open in the top frameset, its ok becuase I know that already. I wanted to fix this before altering the Flash to have it point to the bottom frame. Thanks for your time! :) __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup -- 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] Url link
$REMOTE_ADDR is what you're looking for. To find out all these sort of variables PHP makes available to you, do a ?php phpinfo(); ? page and then look at the section titled: Apache Environment. Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here Anyone know how to get the connecting client's ip address using php? I need to log this information to a db for security reasons
Re: [PHP-DB] Url link
Hi! Check the REMOTE_ADDR variable in the HTTP header. ?php echo $REMOTE_ADDR; ? will print the client IP address See you Nono On Mon, 14 May 2001 [EMAIL PROTECTED] wrote: Anyone know how to get the connecting client's ip address using php? I need to log this information to a db for security reasons Thanks Robert Staph, W3RCS The Center for Advanced Technologies - Original Message - From: Roel Mulder [EMAIL PROTECTED] To: Mark McCray [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, May 14, 2001 4:51 PM Subject: Re: [PHP-DB] Url link Hi Mark, Try this code for your delight: http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html Regards, Roel Mulder At 16:02 14-05-2001 -0400, you wrote: Hey there, I'm trying to build NEXT/PREV buttons on my search page. The only way I know to do it so far is via an url. 8 8 8 8 Does anyone know how best to get rid of the \'s or a better way to do next/prev buttons? Thanks!!! Mark Mulder Technisch Advies Postbus 69 NL-2740 AB WADDINXVEEN tel. 0182-640184 fax. 0182-640185 http://www.mta.nl -- 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] Flash+PHP search error
on 5/14/01 2:37 PM, Brian Tegtmeier ([EMAIL PROTECTED]) wrote: I am currently in the progress of setting up a page for my client located at http://64.77.185.160/main.html which integrates a PHP search function to find keywords on a page. The problem I am running into now is when I goto that main.html page, I get this \n, $header); } } ? message above my Flash movie and have no idea why it is causing it on the Unix server with PHP 4.05. Looking at the source of nav.html in IE, I see that PHP isn't parsing the page. All of the PHP is visible. IE is just trying to display what it can of what it sees. Try changing the file name to nav.php. HTH, Paul ++ Paul Burney Webmaster and Open Source Developer Educational Technology Unit Graduate School of Education and Information Studies University of California, Los Angeles (310) 825-8365 [EMAIL PROTECTED] http://www.gseis.ucla.edu/ ++ -- 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] Flash+PHP search error
This is not really related to PHPDB Send me the code . It looks like you have an unbalanced double-quote. Same thing's happening with your footer, too. Should be an easy fix. -Szii - Original Message - From: Brian Tegtmeier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 14, 2001 2:37 PM Subject: [PHP-DB] Flash+PHP search error I am currently in the progress of setting up a page for my client located at http://64.77.185.160/main.html which integrates a PHP search function to find keywords on a page. The problem I am running into now is when I goto that main.html page, I get this \n, $header); } } ? message above my Flash movie and have no idea why it is causing it on the Unix server with PHP 4.05. The thing is the PHP search and the Flash movie work fine for searches even with that message, its just that I'm looking for a way to remove it. The funny thing about it is it shows up only on IE and Netscape 6 for the PC/Mac but Netscape 4.76 doesn't show that text. weird. P.S. If you notice the Search Results open in the top frameset, its ok becuase I know that already. I wanted to fix this before altering the Flash to have it point to the bottom frame. Thanks for your time! :) __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup -- 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] pg_fieldisnull analogon in mysql?
Hi folks Is there a way to check a field out of an existing db result if it is NULL in mysql? According to the manuals this must be one of the differences between postgresql and mysql. Does anybody know a work-around to get it? Notice: I have a normal, existing query result that doesn't check for NULL values - something like int mysql_fieldisnull (int result_id, int row, mixed field) (adapted from the pg function ;-)) Or do I have to resend another query that does NULL checking explicitly? Thank for advice Regards Steff -- 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] file() fails to read https
I am writing php code on a Unix server which reads a call to Micro$oft SQL statement via asp on an IIS server. I am using file() to get the results. This works beautifully: $fcontents = file (http://www.domain.com/URLSearch.asp?Info=$info;); The results of the query are in $fcontents. Pretty standard php stuff. However, when I make the same call on a secure connection (as in) , $fcontents = file (https://www.domain.com/URLSearch.asp?Info=$info;); I get the following error message: Warning: file(https://www.domain.com/URLSearch.asp?Info=$info;) - No such file or directory in /home/mysite/phplib/getinfo.php on line 4 The only change in the entire code is the s. Let me see if I can answer some questions before they are asked: Yes. I am actually getting real content on the non-secure connection. Yes. The secure connection is really functional on the other server. (I can actually cut the above address and paste it into the address bar and get the results that I am expecting.) So, my question is How do I read this secure file? No one even mentions https in the file() function section of php.net. Thanks, Mark
Re: [PHP-DB] Printing out usernames and logins
Doh, stupid me. Thanks very much for your help. Your a life saver. Cheers, Jord On Monday 14 May 2001 8:49 am, you wrote: ¥es, U R overwriting Ur result-set from the 1st qry. Store instead the 1st result into an array and iterate it then, sending your second select. U can also use 2 connections, but ... ? Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 7:35 PM To: PHP DB List; PHP General List Subject: [PHP-DB] Printing out usernames and logins Hi, I'm trying to print out a list of usernames and the times they logged in. I want to print it out like: joe fred frank Then when you click on one of the names it show just there login times, like this, so if I click on fred it prints out: joe fred - login time - login time - login time frank But it doesn't continue printing out the rest of the usernames after it's finished printing freds logins. Any ideas would be appreciated. The code seems to have something to do with the second query, I think The code I'm using is below. Thanks, Jord db_connect(); $sql = SELECT id, username FROM users; $result = @mysql_query($sql); if(@mysql_num_rows($result) 0) { echo'This is a list of Members who have Logged In to their account with times and dates:BRBR'; while(list($id, $username) = mysql_fetch_array($result)) { echoA HREF=\$PHP_SELF?user=$usernameid=$id\$username/ABR\n; if($username == $user) { $sql = SELECT UNIX_TIMESTAMP(time) AS time FROM user_logins WHERE user_id = $id ORDER BY time DESC; $result = @mysql_query($sql); while(list($time) = mysql_fetch_array($result)) { echo date('h:i a l d F', $time).BR\n; } } } } else { echo error('No one has Logged In yet!'); } -- 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] Printing out usernames and logins
Hi, I'm trying to print out a list of usernames and the times they logged in. I want to print it out like: joe fred frank Then when you click on one of the names it show just there login times, like this, so if I click on fred it prints out: joe fred - login time - login time - login time frank But it doesn't continue printing out the rest of the usernames after it's finished printing freds logins. Any ideas would be appreciated. The code seems to have something to do with the second query, I think :-( The code I'm using is below. Thanks, Jord db_connect(); $sql = SELECT id, username FROM users; $result = @mysql_query($sql); if(@mysql_num_rows($result) 0) { echo'This is a list of Members who have Logged In to their account with times and dates:BRBR'; while(list($id, $username) = mysql_fetch_array($result)) { echoA HREF=\$PHP_SELF?user=$usernameid=$id\$username/ABR\n; if($username == $user) { $sql = SELECT UNIX_TIMESTAMP(time) AS time FROM user_logins WHERE user_id = $id ORDER BY time DESC; $result = @mysql_query($sql); while(list($time) = mysql_fetch_array($result)) { echo date('h:i a l d F', $time).BR\n; } } } } else { echo error('No one has Logged In yet!'); } -- 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]