RE: [PHP-DB] USA Attacks
I couldn't aggree more. I is a tragedy when so much innocent people dies, and leaves families,children and friends behind. But make no mistake... NATO and smart bombs have killed much more innocent people all around the world in the name of freedom and republic. I think whois responsible must be punished severely but american people should know that tis is a result of their foreign politics. If you could leave the reast of the globe just be. -Original Message- From: Lars B. Jensen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 9:18 AM To: Bartek Pawlik; [EMAIL PROTECTED] Subject: RE: [PHP-DB] USA Attacks It is replies like this that makes me understand the terrorism in the world... No doubt, it was a horrible act by cowards, but what comes up must come down. US has been playing with fire once too often and suddenly tasted their medicine - maybe time to rethink the world police strategy again. I feel sympathy for all who died in the incident for no cause. Dont get me wrong on that point ! / LJ -Original Message- From: Bartek Pawlik [mailto:[EMAIL PROTECTED]] Sent: 12. september 2001 14:35 To: [EMAIL PROTECTED] Subject: Odp: [PHP-DB] USA Attacks My deepest sympathy to all Americans, It's horrible, I can still believe it. Kill everyone who is involved into these attacks Bartek Pawlik Poland - Original Message - From: Steve Farmer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 12, 2001 4:28 AM Subject: [PHP-DB] USA Attacks Hi, My heart goes out to all our American cousins in their time of tragedy. Steve Farmer -- --- Minds are like parachutes, they work best when open Support free speech; visit http://www.efa.org.au/ Heads Together Systems Pty Ltd http://www.hts.com.au Email: [EMAIL PROTECTED] Tel: 612 9982 6767 Fax: 612 9981 3081 -- 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] -- Zagraj z finalistkami Miss Polonia [ http://miss.onet.pl/start.html ] -- 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] CHAR(0) retrival
I am having a problem using CHAR(0) fields. I am not able to differenciate between NULL and NOT NULL while retriving these fields although I can SELECT these fields if I mention it in my query to MySQL. Krishnakumar -- 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] MSSQL Views and Multiples selects on Mysql
Hi. I am migrating part of a big database of MSSQL to MySQL . The tables are migrated and data is ok but I need the views that I used on MSSQL . I tried this , I replaced the name of the view used with the sql statement , a very big select statement. I have checked SQL syntax with MySQL documentation and I think it's ok. It gives me with mysql_errorno the error 1064, any ideas? . Is there any program , script , etc to migrate to MySQL SQL syntax the views of MSSQL . Later, Jorge Gimenez
[PHP-DB] array in db field - actual array
hi, i am currently scouring the web for a solution to this but thought i would try here as well .. i have a text field in a mysql database the textfield contains an array written out as // $array[0][1]=one; $array[0][2]=two; $array[0][3]=thre; $array[1][1]=four; $array[2][1]=five; // now i need to extract this from the db .. simple and use it as an array for a function .. not as simple as i thought it would be ie $newarray =mysqlquery('etc','etc','etc') and $newarray should be $newarray[0][1]=one; $newarray[0][2]=two; $newarray[0][3]=thre; $newarray[1][1]=four; $newarray[2][1]=five; elp? cheers brendan -- 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] array in db field - actual array
Hi, I think you can use the eval() function to execute the stored info. The code will look something like this $res=mysql_query(...) eval($row_from_query); If you want to change the name of the array you could use eval(str_replace($array,$newarray,$row_from_query)); HTH Dobromir Velev -Original Message- From: brendan [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, September 13, 2001 2:20 PM Subject: [PHP-DB] array in db field - actual array hi, i am currently scouring the web for a solution to this but thought i would try here as well .. i have a text field in a mysql database the textfield contains an array written out as // $array[0][1]=one; $array[0][2]=two; $array[0][3]=thre; $array[1][1]=four; $array[2][1]=five; // now i need to extract this from the db .. simple and use it as an array for a function .. not as simple as i thought it would be ie $newarray =mysqlquery('etc','etc','etc') and $newarray should be $newarray[0][1]=one; $newarray[0][2]=two; $newarray[0][3]=thre; $newarray[1][1]=four; $newarray[2][1]=five; elp? cheers brendan -- 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-DB] array in db field - actual array
thanks dobromir, unfortunately that doesnt seem to work ... although looking at the php manual you seem to be on the right track.. could the way the textfield is parsed passed back affect the array? cheers! brendan Dobromir Velev wrote: Hi, I think you can use the eval() function to execute the stored info. The code will look something like this $res=mysql_query(...) eval($row_from_query); If you want to change the name of the array you could use eval(str_replace($array,$newarray,$row_from_query)); HTH Dobromir Velev -Original Message- From: brendan [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, September 13, 2001 2:20 PM Subject: [PHP-DB] array in db field - actual array hi, i am currently scouring the web for a solution to this but thought i would try here as well .. i have a text field in a mysql database the textfield contains an array written out as // $array[0][1]=one; $array[0][2]=two; $array[0][3]=thre; $array[1][1]=four; $array[2][1]=five; // now i need to extract this from the db .. simple and use it as an array for a function .. not as simple as i thought it would be ie $newarray =mysqlquery('etc','etc','etc') and $newarray should be $newarray[0][1]=one; $newarray[0][2]=two; $newarray[0][3]=thre; $newarray[1][1]=four; $newarray[2][1]=five; elp? cheers brendan -- 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] array in db field - actual array
scratch that, i had a syntax error in the array.. you were completely right dobromir eval() works perfectly.. thanks! Brendan wrote: thanks dobromir, unfortunately that doesnt seem to work ... although looking at the php manual you seem to be on the right track.. could the way the textfield is parsed passed back affect the array? cheers! brendan Dobromir Velev wrote: Hi, I think you can use the eval() function to execute the stored info. The code will look something like this $res=mysql_query(...) eval($row_from_query); If you want to change the name of the array you could use eval(str_replace($array,$newarray,$row_from_query)); HTH Dobromir Velev -Original Message- From: brendan [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, September 13, 2001 2:20 PM Subject: [PHP-DB] array in db field - actual array hi, i am currently scouring the web for a solution to this but thought i would try here as well .. i have a text field in a mysql database the textfield contains an array written out as // $array[0][1]=one; $array[0][2]=two; $array[0][3]=thre; $array[1][1]=four; $array[2][1]=five; // now i need to extract this from the db .. simple and use it as an array for a function .. not as simple as i thought it would be ie $newarray =mysqlquery('etc','etc','etc') and $newarray should be $newarray[0][1]=one; $newarray[0][2]=two; $newarray[0][3]=thre; $newarray[1][1]=four; $newarray[2][1]=five; elp? cheers brendan -- 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] NCLOB storage
Hi, I have a perfectly fine piece of code that takes a form input and stores it as a CLOB, but when I try to store it in an NCLOB with the same piece of code I get an error: Warning: OCILobWrite: ORA-24806: LOB form mismatch in c:\apache\htdocs\working_clob.php on line 24 $sql = insert into jtest values (1,empty_clob(),empty_clob()) returning b into :b; $stmt = OCIParse($connected, $sql); $clob = OCINewDescriptor($connected, OCI_D_LOB); OCIBindByName ($stmt, :b, $clob, -1, OCI_B_CLOB); OCIExecute($stmt, OCI_DEFAULT); $clob-save ($HTTP_POST_VARS[bigtext]); // this is line 24 OCICommit($connected); OCIFreeDescriptor($clob); OCIFreeStatement($stmt); At a guess I need to use the multibyte string functions but there seems to be a big old lack of examples :-/ The following seems to have zero effect: mb_internal_encoding()=UTF-8; $interenc = mb_internal_encoding(); $inputenc = mb_convert_variables($interenc, ASCII,UTF-8,SJIS-win, $HTTP_POST_VARS[bigtext]); Anyone know how I set this up? System is php 4.06, Apache 1.3.20 and W2K. Thanks, J. -- 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] Passing parameters to a PHP file.
Thanks Leo, i solved the problem using $HTTP_GET_VARS[]. -- == Victor Espina Caracas, Venezuela http://mitrompo.com/vespina [EMAIL PROTECTED] (Quite el 'nospam' para responder) (Remove 'nospam' to reply) Leo G. Divinagracia III [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... u quick question, does VAR1 contain a value before the call??? could be null to begin with... Victor Espina wrote: I want to call a PHP file with some parameters. I tried this sintax: HREF=MyPage.PHP?Var1=Value1 But i don't seem to be receiving any value for Var1. I tested it with: print Var1: $Var1; and the output is Var1: What i'm missing here? -- == Victor Espina Caracas, Venezuela http://mitrompo.com/vespina [EMAIL PROTECTED] (Quite el 'nospam' para responder) (Remove 'nospam' to reply) -- 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] -- Leo G. Divinagracia III [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: NCLOB storage
Oops, damn profile : please reply to group or [EMAIL PROTECTED] Many thanks -- 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[2]: [PHP-DB] Selecting twice from the same table
Hello Justin, Thursday, September 13, 2001, 11:07:26 AM, you wrote: JB On Thu, 13 Sep 2001, Jacob Singh wrote: Hello, main -- ID autonumber content_ID enum('artist','song','album',user function','genre', etc.) name char img char des char etc. etc. songs --- main_ID ( link to main table) int artist_ID (link to parent) int length (length of song) char size (size of file) char file (file location) char etc. etc. Now my goal is to take a given number of songs say 10 songs of various artists and get a list like: artist 1 song1 - length - size song2 - length - size song3 - length - size artist 2 song1 - length - size song2 - length - size song3 - length - size JB I -think- I'm seeing your database design... but I'm not sure if your JB parent id (artist_id) links back to the songs table or the main table.. at JB any rate, a simple GROUP BY on your query would let you query out songs by JB criteria and then sort them by artist. JB BTW, you may wish to take a look at any similar projects at JB www.freshmeat.net for examples, unless you've already done that and found JB that no other projects come close to your needs. JB Justin Buist The parent id links back to the main table. I'm sorry, I didn't eleborate enough. There is one more table to note, the downloads table. This table just matches member id's to song id's to see whos bought what. downloads member_ID (from user table, unimportant) song_ID (links to both the main table and songs table) so if my data looked like: member_ID | song_ID 1 |1 1 |2 1 |5 2 |1 3 |5 3 |4 3 |1 I'd want to query something like: SELECT song_ID,songs.*,main.* from downloads,songs,main WHERE downloads.member_ID = X X being an int AND songs.main_ID = main.ID and songs.artist_ID = main.ID (obvious problem here) The issue is that I need to get the name field and others from the main table for each song and simultaneously get those same fields from that same table from the artist_ID field in the same recordset, get it? I'm thinking that there is no way to do this with sub-selects, is it possible to do with PHP someway? thanx, J -- Best regards, Jacobmailto:[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] CHAR(0) retrival
CHAR(0) allocates no space to the variable, ther than house-keeping space. Why are you dong that? You say you can SELECT but cannot retrieve. SELECTing is retrieving. Please elaborate. -Original Message- From: Krishnakumar S [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 2:54 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] CHAR(0) retrival I am having a problem using CHAR(0) fields. I am not able to differenciate between NULL and NOT NULL while retriving these fields although I can SELECT these fields if I mention it in my query to MySQL. Krishnakumar -- 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] Straightforward authentication?
Hi all: The few php/MySQL apps I've developed that required username/password access, have simply been a means of comparing usernames and hashes of passwords in a DB. My next application needs to be slightly more secure but nothing like the needs of protecting online banking or vulnerable private info. I have read several articles at phpbuilder.com and stuff at php.net, and frankly most of it seems to be overly contrived. I wonder wether some list members would be able to point me in the direction of code and/or tutorials that *explain* in English what they're doing and why. For example why they are storing an MD5() hash of something in a seperate file outside the web-server's doc-root etc etc. Once I have my head round the concepts I'll be posting my findings to a public location which list-members will be among the first to view. I thank y'all for any help you are able to give. Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge 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] prepared statements under load with pconnect
When I use pconnect to connect to a db2 back end, I get the expected faster connection times. However, when the site is under any sort of load (6 or more concurrent accesses), we have noted that the time spent preparing statements increases greatly (execution time remains fairly consistent however). If anybody knows anything about this, your help would be greatly appreciated. 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]
[PHP-DB] Table display Driving me Crazy!
Hello * trying to output mysql content into a table, but the table is designed to use 3 Trows to display info for ONE product (table also has to have 5 columns): row1 sku1|sku2|sku3|sku4|sku5 row2 img1|img2|img3|img4|img5 row3 nam1|nam2|nam3|nam4|nam5 - row4 sku6|sku7|sku8|sku9|sku10 row5 img6|img7|img8|img9|img10 row6 nam6|nam7|nam8|nam9|nam10 - etc... I have code that is displaying the right #of columns but it is simply repeating the product across the table... table width=100% border=1 cellspacing=0 cellpadding=0 bgcolor=#00 ?php $db-query($list); while ($db-next_record()) { ? tr bgcolor=#66 ?php $numcols = 5; for ($l = 1; $l = $numcols; ++$l) {? td width=139 class=ModNo bordercolor=#00?php echo $db-f(product_sku); ?/td ?php } ? /tr tr bgcolor=#ECEF7A ?php for ($l = 1; $l = $numcols; ++$l) { ? td height=80 bordercolor=#00 div align=centerA HREF=?php $sess-purl(URL . ?page=$flypageproduct_id= . $db-f(product_id) . category_id= . $db-f(category_id)); ? ?php $ps_product-show_image($db-f(product_thumb_image),); ?/A /div /td ?php } ? /tr tr bgcolor=#C9C62D bordercolor=#C9C62D ?php for ($l = 1; $l = $numcols; ++$l) { ? td class=prodName?php $db-p(product_name); ?/td ?php } ? /tr ?php } ? /table Anybody have any ideas how I can get this thing to work?! Thanks Luis __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- 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] Table display Driving me Crazy!
What does you mysql table look like? What does your SELECT statements look like? What does function p() do? What does function f() do? Need more info -Original Message- From: Adv. Systems Design [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 11:09 AM To: PHP List Subject: [PHP-DB] Table display Driving me Crazy! Hello * trying to output mysql content into a table, but the table is designed to use 3 Trows to display info for ONE product (table also has to have 5 columns): row1 sku1|sku2|sku3|sku4|sku5 row2 img1|img2|img3|img4|img5 row3 nam1|nam2|nam3|nam4|nam5 - row4 sku6|sku7|sku8|sku9|sku10 row5 img6|img7|img8|img9|img10 row6 nam6|nam7|nam8|nam9|nam10 - etc... I have code that is displaying the right #of columns but it is simply repeating the product across the table... table width=100% border=1 cellspacing=0 cellpadding=0 bgcolor=#00 ?php $db-query($list); while ($db-next_record()) { ? tr bgcolor=#66 ?php $numcols = 5; for ($l = 1; $l = $numcols; ++$l) {? td width=139 class=ModNo bordercolor=#00?php echo $db-f(product_sku); ?/td ?php } ? /tr tr bgcolor=#ECEF7A ?php for ($l = 1; $l = $numcols; ++$l) { ? td height=80 bordercolor=#00 div align=centerA HREF=?php $sess-purl(URL . ?page=$flypageproduct_id= . $db-f(product_id) . category_id= . $db-f(category_id)); ? ?php $ps_product-show_image($db-f(product_thumb_image),); ?/A /div /td ?php } ? /tr tr bgcolor=#C9C62D bordercolor=#C9C62D ?php for ($l = 1; $l = $numcols; ++$l) { ? td class=prodName?php $db-p(product_name); ?/td ?php } ? /tr ?php } ? /table Anybody have any ideas how I can get this thing to work?! Thanks Luis __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- 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]
SV: [PHP-DB] Straightforward authentication?
A common way to identify a client is to use the challange-response algorithm. It works like this: Ps is the password stored on the server Pc is the password entered by the client H is a hash-function (md5 for example) V is a 'random' value Server calculates H(V + Ps) and save this in a session variable. The server then send V to the client which respond with H(V + Pc). Now, the server can compare H(V + Ps) with H(V + Pc). If they are equal, the user must have given the correct password! Otherwise the identification failed. The good thing with this algorithm is that no password need to be sent in plain-text between the client and the server. The random value is used to ensure that the response is not just something that a hacker has sniffed in a previous session. The downside is that the database must be secure, since the passwords are stored in plain-text. A even better way is of course to use SSL. In that case the client just send the password to the server and the server compares H(P) with the stored hash in the database. Don't know if this was what you were looking for... /torgil -Ursprungligt meddelande- Fran: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]For Russ Michell Skickat: den 13 september 2001 17:36 Till: [EMAIL PROTECTED] Amne: [PHP-DB] Straightforward authentication? Hi all: The few php/MySQL apps I've developed that required username/password access, have simply been a means of comparing usernames and hashes of passwords in a DB. My next application needs to be slightly more secure but nothing like the needs of protecting online banking or vulnerable private info. I have read several articles at phpbuilder.com and stuff at php.net, and frankly most of it seems to be overly contrived. I wonder wether some list members would be able to point me in the direction of code and/or tutorials that *explain* in English what they're doing and why. For example why they are storing an MD5() hash of something in a seperate file outside the web-server's doc-root etc etc. Once I have my head round the concepts I'll be posting my findings to a public location which list-members will be among the first to view. I thank y'all for any help you are able to give. Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge 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 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 connecting to MSSQL 2k DB
I'm running Win2k server, with MSSQL 2k, PHP 4.0.6. Every time I try to connect to the SQL sesrver within the script I get the following output: X-Powered-By: PHP/4.0.6 Content-type: text/html Warning: MS SQL message: Login failed for user 'tu'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in [script path] on line 9 Warning: MS SQL: Unable to connect to server: PHP in [script path] on line 9 Warning: MS SQL: Unable to connect to server: (null) in [script path] on line 10 Warning: MS SQL: A link to the server could not be established in [script path] on line 10 Lines 9 10 are as follows: $link_identifier = mssql_connect($server, $user, $pw); mssql_select_db($db); I have the php_mssql.dll file installed in %systemroot%/system32 and the appropriate line in php.ini. I've found hundreds of references on various websites and in the mailing list archives to php_mssql70.dll, but cannot locate it anywhere. Any help/thoughts/guidance would be appreciated. -=-=- Sean Swehla, MCP Network Architect VPN Solutions, LLC -- 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 HELP WITH ORACLE PHP PLZ.
I have The following A Sun Ultra2 Running the Oracle Client talking to a Oracle Instance 8.1.7 on another server. sqlplus scott@rhinodb works greate. I do have to be in $ORACLE_HOME for some reason. When I issue the following command I get an error !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleUntitled/title /head body ?php $link = ora_logon(scott@RHINODB, tiger) or die (Could not connect); print (YAA Connected successfully); ? /body /html Error in the Browser Warning: Oracle: Connection Failed: Error while trying to retrieve text for error ORA-12154 in /export/dsk2/apache/htdocs/rhinodb/cgi-bin/dbtest.php on line 8 YAA Connected successfully -- 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 to Replace the table data
Is it possible to find and replace a data in the table using phpMyAdmin ? If yes, how to do that ? I want to change http://something.com/; to http://www.something.com/target; thanks folks _ www.kaskus.com - FREE EMAIL SERVICE -- 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] Table display Driving me Crazy!
- Original Message - From: Adv. Systems Design [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Friday, September 14, 2001 12:09 AM Subject: [PHP-DB] Table display Driving me Crazy! Hello * trying to output mysql content into a table, but the table is designed to use 3 Trows to display info for ONE product (table also has to have 5 columns): row1 sku1|sku2|sku3|sku4|sku5 row2 img1|img2|img3|img4|img5 row3 nam1|nam2|nam3|nam4|nam5 - row4 sku6|sku7|sku8|sku9|sku10 row5 img6|img7|img8|img9|img10 row6 nam6|nam7|nam8|nam9|nam10 - etc... I have code that is displaying the right #of columns but it is simply repeating the product across the table... table width=100% border=1 cellspacing=0 cellpadding=0 bgcolor=#00 ?php $db-query($list); while ($db-next_record()) { ? tr bgcolor=#66 ?php $numcols = 5; for ($l = 1; $l = $numcols; ++$l) {? td width=139 class=ModNo bordercolor=#00?php echo $db-f(product_sku); ?/td ?php } ? /tr tr bgcolor=#ECEF7A ?php for ($l = 1; $l = $numcols; ++$l) { ? td height=80 bordercolor=#00 div align=centerA HREF=?php $sess-purl(URL . ?page=$flypageproduct_id= . $db-f(product_id) . category_id= . $db-f(category_id)); ? ?php $ps_product-show_image($db-f(product_thumb_image),); ?/A /div /td ?php } ? /tr tr bgcolor=#C9C62D bordercolor=#C9C62D ?php for ($l = 1; $l = $numcols; ++$l) { ? td class=prodName?php $db-p(product_name); ?/td ?php } ? /tr ?php } ? /table Anybody have any ideas how I can get this thing to work?! Looking at your code for the first row (I've cleaned it up a bit to make it readable!): ?php $numcols = 5; for ($l = 1; $l = $numcols; ++$l) { ? td width=139 class=ModNo bordercolor=#00 ?php echo $db-f(product_sku); ? /td ?php } ? It should be pretty clear why you're getting the product just repeated 5 times across the row. Your statement: echo $db-f(product_sku); does not contain any reference to variables thus it's essentially a constant. As far as I can make out (your style of coding gives me a headache :)) the other loops suffer from the same problem. If you find yourself often mixing php with html then using the alternative syntax for constructing loops makes the code simpler and clearer (see http://www.php.net/manual/en/control-structures.for.php). Also if your particular php setup allows using ? ? instead of ?php ? to enclose php code looks cleaner. For example the above can be rewritten as: ? $numcols = 5; ? ? for ($l = 1; $l = $numcols; ++$l): ? td width=139 class=ModNo bordercolor=#00 ? echo $db-f(product_sku); ? /td ? endfor; ? hth -- Jason Wong Gremlins Associates www.gremlins.com.hk Tel: +852-2573-5033 Fax: +852-2573-5851 -- 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] Problems inserting large blob
Hello all ... I'm having a problem uploading large files (3MBytes for examples) and inserting it onto a MySQL database. No problem with smaller files. The code is basically this: ?php $data = addslashes(fread(fopen($form_data, rb), filesize($form_data))); $result=MYSQL_QUERY(INSERT INTO file2download (description,bin_data,filename,filesize,filetype, filecompany) . VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data _type', '$empresa')); if (mysql_errno() != 0) echo mysql_error(); $id= mysql_insert_id(); ? When the files are the mentioned size (I checked the whole file got there on /tmp/something) I get an error message along these lines: 'MySQL Server moved away' and the fid is 0. Any ideas? Is there any limitation on the size of the 'insert into' string? If so, how can I store such a big data chunk on the database? And please, answer directly by email as well to me. Sometimes it is difficult to find a message among the ones that we get each day! Thanks for your support, João Barreto - Convex Portugal -- 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] Table display Driving me Crazy!
Looking at your code for the first row (I've cleaned it up a bit to make it readable!): ?php $numcols = 5; for ($l = 1; $l = $numcols; ++$l) { ? td width=139 class=ModNo bordercolor=#00 ?php echo $db-f(product_sku); ? /td ?php } ? It should be pretty clear why you're getting the product just repeated 5 times across the row. Your statement: echo $db-f(product_sku); does not contain any reference to variables thus it's essentially a constant. As far as I can make out (your style of coding gives me a headache :)) the other loops suffer from the same problem. The whole block is wraped in a while ($db-next_record()) { ...} loop actually. Now, I'm not sure if the next_record() method is setting an internal member to the current record and returning TRUE/FALSE for success, or if it's actually supposed to be returning a row. I'm guessing the class is simply being mis-used. The code is reasonably logical assuming next_record() is setting an internal member variable to the current row... doesn't look like it is though. I know with ASP/VBScript that there's a decent performance hit when you jump from HTML to VbScript and back again... I would imagine though not as severe the same also happens in PHP. Rather than stop the parser, print out something small like a /td and start the parser back up it's probably better performance wise to just use the 'echo' function (well, keyword, I guess echo isn't a real function, print is though). Plus, it makes your code more readable without all the ?php ? marks everywhere. Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 -- 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] Problems inserting large blob
You might want to check php.ini - if memory serves the maximum filesize you can upload over HTTP by default is 2MB. Bump that number up and restart Apache (or whatever webserver you use) and see if that fixes the problem. Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 On Thu, 13 Sep 2001, Joao Barreto wrote: Hello all ... I'm having a problem uploading large files (3MBytes for examples) and inserting it onto a MySQL database. No problem with smaller files. The code is basically this: ?php $data = addslashes(fread(fopen($form_data, rb), filesize($form_data))); $result=MYSQL_QUERY(INSERT INTO file2download (description,bin_data,filename,filesize,filetype, filecompany) . VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data _type', '$empresa')); if (mysql_errno() != 0) echo mysql_error(); $id= mysql_insert_id(); ? When the files are the mentioned size (I checked the whole file got there on /tmp/something) I get an error message along these lines: 'MySQL Server moved away' and the fid is 0. Any ideas? Is there any limitation on the size of the 'insert into' string? If so, how can I store such a big data chunk on the database? And please, answer directly by email as well to me. Sometimes it is difficult to find a message among the ones that we get each day! Thanks for your support, João Barreto - Convex Portugal -- 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] Table display Driving me Crazy!
The whole block is wraped in a while ($db-next_record()) { ...} loop actually. Now, I'm not sure if the next_record() method is setting an internal member to the current record and returning TRUE/FALSE for success, or if it's actually supposed to be returning a row. It should be the former. But whatever it does, it doesn't change the fact that the code for displaying the 1st, 2nd and 3rd rows are in fact displaying a constant for each of the 5 columns. I'm guessing the class is simply being mis-used. The code is reasonably logical assuming next_record() is setting an internal member variable to the current row... doesn't look like it is though. If I'm not mistaken it looks to be using the phplib library. I believe it *is* being used correctly but he doesn't seem to be choosing the correct fields to display. I know with ASP/VBScript that there's a decent performance hit when you jump from HTML to VbScript and back again... I would imagine though not as severe the same also happens in PHP. Rather than stop the parser, print out something small like a /td and start the parser back up it's probably better performance wise to just use the 'echo' function (well, keyword, I guess echo isn't a real function, print is though). Plus, it makes your code more readable without all the ?php ? marks everywhere. In this case, yes, it's preferable to use echo. But if there are more than a few lines of html then using echo gets tedious pretty quickly (not mention having to escape all the s) :) regards -- Jason Wong Gremlins Associates www.gremlins.com.hk Tel: +852-2573-5033 Fax: +852-2573-5851 -- 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] moving uploaded files
Does anyone have a solution for the following problem. I use dbwired.com for hosting (great service). They do not, however, for obviously reasons allow the system() command from a php script. So, when I switched to this server I had to switch from a system(mv file1 file2); command to a move_uploaded_file(path1,path2); command which is fine...for uploading. But, once a file is uploaded I can't figure out a way to move or delete it as it is no longer considered an uploaded file and hence move_uploaded_file() fails. Does anyone know a way around this? Thanks. -Jon Mormino -- 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/Access and Quickbooks
Does any one have any ideas how Quickbooks data can be synced with an Access database? I want to use PHP to post some account information live from my accounting system and can't seem to figure out a way. If anyone else also has a need to extract information from Quickbooks and has any ideas as to how to do it, I would love to work together to develop something that would work. I hear this is a common problem. Please ADVISE B R I A N G R A Y L E S S Web Administrator Premier Resorts www.premier-resorts.com P: 435-655-4812 F: 413-618-1518 -- 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: reading arrays within a field from mysql and separating the values
You need to split the value into an array using php, then list it out. Lots of ways to do that, here's one. $result4 = mysql_query( SELECT DCD_Access FROM userdb WHERE ID = '$user_ID'); $DCD = mysql_fetch_array ( $result4 ); print td width='6%' valign=top\n div align='center'\n select name='LCompare'\n option value='none'None/option\n option value='within'Within Gel/option\n; // new stuff $vals= explode(, , $DCD[DCD_Access]); for ($i=0;$icount($vals);$i++) { print option value='$vals[$i]'$vals[$i]/option\n; } // end new stuff print/select/div\n /td\n; Robert Trembath wrote: Hello everyone, Ran into a problem trying to get this to work. I have multiple names in a mysql field (DCD_Access) that contains name1, name2, name3, name4 and I want read this information as an array so I can use these values to populate a pull-down list using a while or foreach loop. Below is the code I used, but I get the values as a single entry no matter what I try. This query brings a single result row name1, name2, name3, name4. Here's the code: $result4 = mysql_query( SELECT DCD_Access FROM userdb WHERE ID = '$user_ID'); $DCD = mysql_fetch_array ( $result4 ); print td width='6%' valign=top\n div align='center'\n select name='LCompare'\n option value='none'None/option\n option value='within'Within Gel/option\n; foreach ( $DCD as $val ) { print option value='$val'$val/option\n; } print/select/div\n /td\n; This returns HTML like: td width='6%' valign=top div align='center' select name='LCompare' option value='none'None/option option value='within'Within Gel/option option value='name1, name2, name3, name4'name1, name2, name3, name4/option option value='name1, name2, name3, name4'name1, name2, name3, name4/option option value='name1, name2, name3, name4'name1, name2, name3, name4/option option value='name1, name2, name3, name4'name1, name2, name3, name4/option /select /div /td What I need is to get: td width='6%' valign=top div align='center' select name='LCompare' option value='none'None/option option value='within'Within Gel/option option value='name1'name1/option option value='name2'name2/option option value='name3'name3/option option value='name4'name4/option /select /div /td Anyone know how to fix this? 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] Problems inserting large blob
I also facing this problem yesterday. Do you want to know what i did ? I open the file with notepad then copy paste it. And it's works --- Justin Buist [EMAIL PROTECTED] wrote: You might want to check php.ini - if memory serves the maximum filesize you can upload over HTTP by default is 2MB. Bump that number up and restart Apache (or whatever webserver you use) and see if that fixes the problem. Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 On Thu, 13 Sep 2001, Joao Barreto wrote: Hello all ... I'm having a problem uploading large files (3MBytes for examples) and inserting it onto a MySQL database. No problem with smaller files. The code is basically this: ?php $data =3D addslashes(fread(fopen($form_data, rb), filesize($form_data))= ); $result=3DMYSQL_QUERY(INSERT INTO file2download (description,bin_data,filename,filesize,filetype, filecompany) . VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_d= ata _type', '$empresa')); if (mysql_errno() !=3D 0) echo mysql_error(); $id=3D mysql_insert_id(); ? When the files are the mentioned size (I checked the whole file got there= on /tmp/something) I get an error message along these lines: 'MySQL Server moved away' and t= he fid is 0. Any ideas? Is there any limitation on the size of the 'insert into' string? If so, h= ow can I store such a big data chunk on the database? And please, answer directly by email as well to me. Sometimes it is difficult to find a message among the ones that we get each day! Thanks for your support, Jo=E3o Barreto - Convex Portugal -- 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] _ www.kaskus.com - FREE EMAIL SERVICE -- 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] moving uploaded files
How about: copy(path1,path2); unlink(path1); On Thu, 13 Sep 2001 16:07:14 -0400 Jon Mormino [EMAIL PROTECTED] wrote: Does anyone have a solution for the following problem. I use dbwired.com for hosting (great service). They do not, however, for obviously reasons allow the system() command from a php script. So, when I switched to this server I had to switch from a system(mv file1 file2); command to a move_uploaded_file(path1,path2); command which is fine...for uploading. But, once a file is uploaded I can't figure out a way to move or delete it as it is no longer considered an uploaded file and hence move_uploaded_file() fails. Does anyone know a way around this? Thanks. -Jon Mormino -=-=- Sean Swehla, MCP Network Architect VPN Solutions, LLC -- 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] Backups, best practices
Beau Lebens wrote: // err.. please correct me if I'm wrong, but isn't pkzip // exactly that? or more // exactly, winzip is a windows interface to it? it certainly // uses the same // compression nope - you're right, i forgot about pkzip, but i was just saying that it's pretty strange that winzip is the biggest compression program used for windoze machines and they haven't released their own command-line version... last i heard it was still in the piplelines. and they probably never will... winzip took the opportunity that PKWARE didnt. winzip released a win interface to the ZIP compression scheme that Phil Katz wrote. and PKWARE never caught up to the popularity that winzip took. sadly, he died of alcoholic reasons. most people never knew him yet his code will live for a long time. trivia: the first two bytes of the any valid zip file? P and K... here's a frief history of the man: http://www.computeraddicts.com/pkzip.htm kinda sad, when i read in a PC MAG article a month or so ago when they celebrated 10 or so people that shaped the PC industry (or was influencial) in the last 20 years. one of persons is the porn king of the internet, and PK is left out... pkzip is made by a different company i think -- Leo G. Divinagracia III [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 to Replace the table data
Is it possible to find and replace a data in the table using phpMyAdmin ? If yes, how to do that ? I want to change http://something.com/; to http://www.something.com/target; Run an UPDATE query? UPDATE table SET url='http://something.com/' WHERE url='http://www.something.com/target' hth -- Jason Wong Gremlins Associates www.gremlins.com.hk Tel: +852-2573-5033 Fax: +852-2573-5851 -- 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] Compiled dBase Extension for Win32?
Hi! I am trying to find a compiled dBase library (php_dbase.dll) for PHP4; found many hints, but nothing useful. Thanks for your help! Thomas -- Thomas Kaeser [EMAIL PROTECTED] *** Courage is not the absence of fear, but rather the judgement that something else is more important than fear. -- 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] mysqlimport
Hello, I'm trying to use: passthru(mysqlimport --replace --fields-terminated-by=\| --user=testuser --password=testpassword testdb /home/testdomain/www/Admin/test_mysqltable.txt, $output); The mysqlimport command works perfectly at the telnet command prompt, but never through Php. When I echo $output I get '126' or '127'. But the process does not work. I have also tried using system and exec commands. Any suggestions? Thanks, Keith
Re: [PHP-DB] How to Replace the table data
its not working because it's not a variable (url) it's a text field 'url' is the name of the field which contains http://something.com/;. Replace it with the name of the field in *your* table which contains http://something.com/;. BTW as Terry pointed out (I misread your question) the update query should be: UPDATE table SET url='http://something.com/target' WHERE url='http://www.something.com/' regards -- Jason Wong Gremlins Associates www.gremlins.com.hk Tel: +852-2573-5033 Fax: +852-2573-5851 -- 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] eregi and ereg??
www.php.net shows the proper format for EREG and EREGI is: int ereg (string pattern, string string [, array regs]) My question is this; I want to be able to compare 2 or more strings to the EREG(I) STRING PATTERN... without having to create two separate EREG(I) IF...THEN statements... If I understand the format as displayed above, then I should be able to put multiple variables in the EREG(I) expression... like so; if(eregi(x, $string1 $string2 $string3, $regs) Is this correct? Or, do I have to specify an IF...THEN type of statement for each $STRING ?? Thanks Jason [EMAIL PROTECTED]