[PHP-DB] First? or Last?
Dear Friend, Are you looking for your first Internet business...or your last? If it's your first, I bet you'd like it to be your last! Your last would be the one that allows you to achieve your full time income on a part time basis, is stable, will be there for your heirs, and give you the lifestyle you dream of. May I have your permission to send your FREE information of an exciting online business which is growing at a very rapid rate? You have: - NO retailing (most people HATE selling) - NO delivering or handling products - NO big up-front investment - and NO risk To receive your FREE information about this legitimate, automated home business that has a proven track record, reply to this message with "show me" as the subject! Thank you and have a great day! Best Regards, Kevin *To be removed from this list please reply with REMOVE as the Subject* -- 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] Script syntax error
I'm using "PHP and MySQL Web Development" published by SAM's. I believe the story_submit.php file for the Content Mangement script in Chapter 26 has a syntax problem. I'm getting errors. I'm very new to MySQL & PHP and would appreciate some help. The form has a field for uploading an optional .html file. That's what $html represents. The $story variable is the story ID. If there is no story ID then it is a new story rather than a story to modified. Here's the code: $sql"; print mysql_error(); exit; } if ( ($picture) && ($picture != "none") ) { if (!$story) $story = mysql_insert_id(); $type = basename($picture_type); switch ($type) { case "jpeg": case "pjpeg": $filename = "pictures/$story.jpg"; copy ($picture, $filename); $sql = "update stories set picture = '$filename' where id = $story"; $result = mysql_query($sql, $conn); break; default:print "Invalid picture format: $picture_type"; } } header("Location: $destination"); ?> Thanks, ~Steve Downs -- 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: Interbase and php on win2k...
Ok im getting some where the Ib dll is finaly getting loaded But now the php is giving me av (the memory could not be written). Here is my code: email . "\n"; } ibase_close ($dbh); ?> What am i dowing whrong?? Thanks Christian -- 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] order by a count of another table
hey guys, i want to show a list of rows from a table sorted by the count of another table. the first table has a username field and so does the other table. so i want to sort the first table by how many rows that has the username from the other table. so something like this although i know its not sql syntax: select * from table order by [count(*) from other_table where username=table.username] can anyone help me out? thanks guys! -- 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] Talent Exchange? Need PHP Programmer
This could very well work into an ongoing working relationship, so please respond if you think you can help! HERE'S THE DEAL: I'm looking to exchange my extensive website design and graphic skills with someone with PHP or Cold Fusion skills that can help finish the backend database for a Real Estate classifieds type of site.In exchange, I will provide you with all the design work you need for any of your projects, above and beyond the value of your time for this project. And yes, I'm qualified and worth it (Wow! Does that sound conceded or what!). WHY I NEED YOU: I've been designing sites since 1995, unfortunately, I have always handed off anything that required backend database design to my fellow colleagues. I am more of a designer, not a programmer. I know a little ColdFusion and PHP, but just don't have what it takes to do this end of the site. Now, my two programming gurus are too busy these days to be able to complete the site. One works in the corporate world now, the other is a full time student in college this semester, so I'm out of luck. Thus, I will be needing someone to take their place as it is for my other clients, so this could work out positively for you! The database has been started in PHP, but now needs your TLC for placement, etc, but I'm open to starting fresh with ColdFusion if need be. WHO NEEDS THE WORK This site is a personal endeavor for my husband and I. He is driving me crazy to get the site done, but I'm so busy designing others websites, that I just don't have time to learn the programming end of things right now to do our own site - and do it right. I guess I'm the "infamous Painter, whose own house needs painting" SUMMARY: What I'm asking is that you help me complete the site using your great database programming skills, in exchange, I will design what ever you need me to design for MORE than equal value of your time. This is so dear to me, trust me when I say, I will give you MORE than the value of your time, I will be forever in your debt!!! I will gladly show you my portfolio before you agree, as I know you will be curious as to my skill level and design talent, believe me, I'm very careful too, and I'm certain you will be impressed! I have extensive experience in Website and Graphics design and experience in team collaboration. I use UltraDev and so would like to work with someone who does as well. I sincerely hope you can help! Thanks so much, Marie [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] Propuesta
Hola como estas estamos interesados en comprar publicidad en tu página mediante nuestro sistema de banners online. El cual consiste en que pongas un banner de MercadoLibre en tu site, y nosotros te pagamos 50 pesos por cada usuario que se registre de tu página a la nuestra activamente, ademas de un 20% de comisiones al hacer transacciones por medio de tu site. Si te resulta de interés la propuesta espero podamos profundizar en detalles para comenzar a trabajar juntos, te anexo un manual para que puedas bajar el banner así como el link para que lo cheques mas a fondo. saludos, Alfonso Vidales. http://www.mercadolibre.com.mx/mexico/ml/p_frameset?as_url=p_affiliate?as_html_id=PG_AFIL1$as_menu=AFILIADOS PD: muy bueno el site, felicitaciones! -- 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] Como crear usuarios reales de linux mediante php
Como crear usuarios reales de linux mediante php, estos usuarios no deben tener shell (Shell false). Gracias a quien me pueda ayudar -- 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] Subject: RE:Please Confirm!! Yes I want to Optin RE : php-db@lists.php.net
NOT STRICK ENOUGH?!? ** This email is sent in compliance with our strict anti-abuse regulations. We are attempting to verify your email address. This message is only a request to verify. It is not in any way to be construed as a commercial message. If you do not wish to receive any mail from our servers, do not reply to this email nor click on any links. If you wish to have your email address blocked from our servers from further verification requests please go to http://inetekk.com/abuse.html Thank you!! Sterling White ***
RE: [PHP-DB] Subject: RE:Please Confirm!! Yes I want to Optin RE: php-db@lists.php.net
Obviously someone pretty smart. -Original Message- From: Sterling [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 2:47 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Subject: RE:Please Confirm!! Yes I want to Optin RE: [EMAIL PROTECTED] Importance: High You [EMAIL PROTECTED], or someone using your email [EMAIL PROTECTED] address, posted to my Blastomatic site. This is a one time emailing to ask you to verify your email address. Just reply to this email address to verify or follow the below instructions. * To receive the Blastomatic please click on the following link: http://oneop.blastomatic.com/rainforest And Optin from this site. To receive my Weekly News Update reply to: mailto:[EMAIL PROTECTED]?Subject=BLASTOMATIC Sincerely, Sterling White ** This email is sent in compliance with our strict anti-abuse regulations. We are attempting to verify your email address. This message is only a request to verify. It is not in any way to be construed as a commercial message. If you do not wish to receive any mail from our servers, do not reply to this email nor click on any links. If you wish to have your email address blocked from our servers from further verification requests please go to http://inetekk.com/abuse.html Thank you!! Sterling White *** -- 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] Subject: RE:Please Confirm!! Yes I want to Optin RE: php-db@lists.php.net
You [EMAIL PROTECTED], or someone using your email [EMAIL PROTECTED] address, posted to my Blastomatic site. This is a one time emailing to ask you to verify your email address. Just reply to this email address to verify or follow the below instructions. * To receive the Blastomatic please click on the following link: http://oneop.blastomatic.com/rainforest And Optin from this site. To receive my Weekly News Update reply to: mailto:[EMAIL PROTECTED]?Subject=BLASTOMATIC Sincerely, Sterling White ** This email is sent in compliance with our strict anti-abuse regulations. We are attempting to verify your email address. This message is only a request to verify. It is not in any way to be construed as a commercial message. If you do not wish to receive any mail from our servers, do not reply to this email nor click on any links. If you wish to have your email address blocked from our servers from further verification requests please go to http://inetekk.com/abuse.html Thank you!! Sterling White *** -- 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 from html form
the subarrays contain variable data and I tried to express that by showing the array structure that way if I access $needed_data[0] it would be an array of two pieces of data ( both variable) $needed_data[1] would also be an array of two variable pieces of data, etc if I loop through them all I can use each "member_id / position " pair to update a database but I have no way to know how many such pairs there will be, and the actual values of $member_id and of $position will be different in each case I hope that helps, sorry I'm not more skilled at expressing this > For one, why are you redefining the array 3 times in that script? ... > I'm trying to follow here... and its not making sense. > > I need to build a multidimensional array from a html form, > the array would look like: > > $needed_data = array ( > array (id = $member_id, > points = $position ), > array ( id = $member_id, > points =$position), > array (id=$member_id, > points = $position); > > $member_id will be used to dynamically build the html form, $position > will be an integer entered into a text field in that form similar to > this: > > Fred($member_id=?) .. [ enter position=? ] > John)$member_id=?) ..[enter position=?] > etc > etc > [SUBMIT] > > IF ( I can get the data into an array like above) { > I can make the rest of the script work } > -- 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 from html form
For one, why are you redefining the array 3 times in that script? ... I'm trying to follow here... and its not making sense. -Original Message- From: Larry Linthicum [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 12:14 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] array from html form Hi I'm just a PHP "hobbiest" trying to build a points calculating system for another hobby, please bear with me. I need to build a multidimensional array from a html form, the array would look like: $needed_data = array ( array (id = $member_id, points = $position ), array ( id = $member_id, points =$position), array (id=$member_id, points = $position); $member_id will be used to dynamically build the html form, $position will be an integer entered into a text field in that form similar to this: Fred($member_id=?) .. [ enter position=? ] John)$member_id=?) ..[enter position=?] etc etc [SUBMIT] IF ( I can get the data into an array like above) { I can make the rest of the script work } but that is a big "if" ... how can I stucture the form and get that multidimen array from the single name/value pairs passed from an html form? OR Maybe I can make a normal array work? I know that enclosing form field names in [] makes them available as an array if the form were dynamically built like PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) etc etc I "think" I would then send an array containing all the $member_id (s) and all the entries into the txt fields first... am I correct in that? second ... is the indexing order known and guaranteed? in other words is $data[0] and $data[1] OR $data[12] and $data[13] ALWAYS going to represent a "matched" pair? ( from "one line" of the form } or is the indexing of the array subject to variation and may NOT be in the same order as the [data] fields in the html ? What if nothing is entered into the txt field?I know that enclosing form field names in [] makes them available as an array if the form were dynamically built like PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) etc etc I "think" I would then send an array containing all the $member_id (s) and all the entries into the txt fields first... am I correct in that? second ... is the indexing order known and guaranteed? in other words is $data[0] and $data[1] OR $data[12] and $data[13] ALWAYS going to represent a "matched" pair? ( from "one line" of the form } or is the indexing of the array subject to variation and may NOT be in the same order as the [data] fields in the html ? What if nothing is entered into the txt field? -- 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] array from html form
Hi I'm just a PHP "hobbiest" trying to build a points calculating system for another hobby, please bear with me. I need to build a multidimensional array from a html form, the array would look like: $needed_data = array ( array (id = $member_id, points = $position ), array ( id = $member_id, points =$position), array (id=$member_id, points = $position); $member_id will be used to dynamically build the html form, $position will be an integer entered into a text field in that form similar to this: Fred($member_id=?) .. [ enter position=? ] John)$member_id=?) ..[enter position=?] etc etc [SUBMIT] IF ( I can get the data into an array like above) { I can make the rest of the script work } but that is a big "if" ... how can I stucture the form and get that multidimen array from the single name/value pairs passed from an html form? OR Maybe I can make a normal array work? I know that enclosing form field names in [] makes them available as an array if the form were dynamically built like PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) etc etc I "think" I would then send an array containing all the $member_id (s) and all the entries into the txt fields first... am I correct in that? second ... is the indexing order known and guaranteed? in other words is $data[0] and $data[1] OR $data[12] and $data[13] ALWAYS going to represent a "matched" pair? ( from "one line" of the form } or is the indexing of the array subject to variation and may NOT be in the same order as the [data] fields in the html ? What if nothing is entered into the txt field?I know that enclosing form field names in [] makes them available as an array if the form were dynamically built like PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) next PERSONS NAME (from database via $member_id ) etc etc I "think" I would then send an array containing all the $member_id (s) and all the entries into the txt fields first... am I correct in that? second ... is the indexing order known and guaranteed? in other words is $data[0] and $data[1] OR $data[12] and $data[13] ALWAYS going to represent a "matched" pair? ( from "one line" of the form } or is the indexing of the array subject to variation and may NOT be in the same order as the [data] fields in the html ? What if nothing is entered into the txt field? -- 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: Inserting CSV in MySQL
1. Check for the special chars around the last entry as andre says. 2. Make sure your type and length of your type can hold the number of records you are importing. -- "It's a good life, enjoy it." - Jim Hensen Eric Schmuttenmaer [[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: Speeding up database access
Hi Check your indices are tuned. Personally, I feel that storing languages srings in arrays, particularly if you are using a cache like Zend/APC gives better performance. Bye, John "Rob)" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am just starting out on a project that has to be multi-lingual. i.e. > every word/sentence I output has to be translated. > > The user logs in, and I read the language they use, by looking at the > user record. > > I then need to get the language translations from a database. > I just "select label, text from language where lang = "English"; > > Fields: [label],[text],[language] > Example: "M1002","Please enter the delivery address","English" > > At the moment I download them into a associative array, so I can > access the text like this. > > txt['M1002'] > > where 'M1002' is a label. I have made txt a session variable. > > The trouble is, there are so many text translations (6000+), that it > takes about 10 seconds to download them all into this array. > > I don't want to access the database every time I need to print out > some text. > > Question:- > > How can I improve the startup time?? In case it was not obvious from > the above, I am a newbie at PHP!! > -- 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: Interbase and php on win2k...
Hi, It definitely is not running the dll. Run and check that the interbase extension is loaded. See if any other extensions can be loaded by modifying php.ini. Check to see if you have multiple php.ini's and check your file/directory permissions. Persistence is the key. Bye, John - Original Message - From: "Christian C." <[EMAIL PROTECTED]> Newsgroups: php.db To: <[EMAIL PROTECTED]> Sent: Friday, October 05, 2001 6:33 PM Subject: Interbase and php on win2k... > Hello :c) > > I cant make this work together... > > I have set up php (it works) > I have set up ib (it works) > but when i try to query ib using php i get : > > Fatal error: Call to undefined function: ibase_connect() in > c:\inetpub\wwwroot\ib.php on line 10 > > I have set my extension_dir to (where the dll reside) > extension_dir = C:\Servers\PHP\extensions > > and uncomment my dll: > extension=php_interbase.dll > > Any one know what the broblem could be??? > > Thanks > Christian > > -- 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] Auto_increment field size (was: Howto make a double LEFT JOIN)
Hello, > you can always reset the auto_increment value (I think that is as simlple as > "set insert_id=1;" but you may want to double check as this is off the top > of my head). I don't think i can do so cause i never delete all rows. so will get something like: 1 <- new insert her 1000 1001 etc. -- 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] Auto_increment field size (was: Howto make a double LEFT JOIN)
- Original Message - From: "Bas Jobsen" <[EMAIL PROTECTED]> To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, October 05, 2001 9:50 AM Subject: Re: [PHP-DB] Howto make a double LEFT JOIN > > ACK! Don't do this. You do know that an unsigned int (using a signed int > > in an auto_increment field is pointless anyway) has a max value of > > 4294967295, right? To put this into perspective... if you had one million > > customers, they would have more than 4294 transactions EACH before sid > > filled up. If you are still worried about running out of numbers in your > > sid field make it an unsigned bigint. The max value for an unsigned > bigint > > is 18446744073709551615... so that should give you lots of space to play > in, > > Well, oke. I'm builing some pageviewcounter. Maybe count more then > 1 million pageview a day in future :) You're right it will take many days > before i have counted 18446744073709551615 views :). But in some way it feel > like wasting. The first day using the first milion ids, the second day the > next milion and never reuse that numbers. (Yes i realize 8bytes a row is > much better then 32 (or 33 if you do stupid things :))) > > Maybe there is a better implemention? I dont i the first one solving this? This is usually viewed as a non-issue. The reason is you are using 8 bytes whether sid=1 or (2^64-1) (which is the really big number above). In addition (2^64-1) is a REALLY big number. If you had a Billion hits a day, you would not run out of possible sid's for approximately 50.5 million years. Finally, since you are deleting rows after a certain amount of time you can always reset the auto_increment value (I think that is as simlple as "set insert_id=1;" but you may want to double check as this is off the top of my head). > > > and sid will only be 8 bytes per row... not 33 (Also incidentally, if you > do > > want to save an md5 value to a row in the future... use char not varchar > as > > you know it will be 32 bytes and are adding a wasted 33rd byte). > > Oke, i see. > > Best regards, > > Bas Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.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] Howto make a double LEFT JOIN
Hello, > okay... 1< Your result will be a binary number... which will be the number 1 followed > by table1.sid 0's. Once you have this you do a bitwise or of all the > numbers you have shifted. This means any two rows where sid was the same > will be combined, as there is no difference between (1 or 1) and (1 or 0). > The last step, then, is to count the 1 bits and see how many different sid's > there were. > > Make Sense? The problem before was that there was no way to differentiate > one row from another, and thus no way to combine identical rows =P Oke, tnx, i understood > ACK! Don't do this. You do know that an unsigned int (using a signed int > in an auto_increment field is pointless anyway) has a max value of > 4294967295, right? To put this into perspective... if you had one million > customers, they would have more than 4294 transactions EACH before sid > filled up. If you are still worried about running out of numbers in your > sid field make it an unsigned bigint. The max value for an unsigned bigint > is 18446744073709551615... so that should give you lots of space to play in, Well, oke. I'm builing some pageviewcounter. Maybe count more then 1 million pageview a day in future :) You're right it will take many days before i have counted 18446744073709551615 views :). But in some way it feel like wasting. The first day using the first milion ids, the second day the next milion and never reuse that numbers. (Yes i realize 8bytes a row is much better then 32 (or 33 if you do stupid things :))) Maybe there is a better implemention? I dont i the first one solving this? -- every step i do: 1) creating a (1!) row id(unique)||time 2) deleting row(s) time and sid will only be 8 bytes per row... not 33 (Also incidentally, if you do > want to save an md5 value to a row in the future... use char not varchar as > you know it will be 32 bytes and are adding a wasted 33rd byte). Oke, i see. > See my explanation above. All you are trying to do is shift a 1 digit to a > different place for each unique value of sid. The above definately won't > work if sid is an md5 value as md5 includes a-z characters. oke. > Again, hope that helps =) I will let you know Best regards, Bas -- 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] Howto make a double LEFT JOIN
- Original Message - From: "Bas Jobsen" <[EMAIL PROTECTED]> To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 04, 2001 7:17 PM Subject: Re: [PHP-DB] Howto make a double LEFT JOIN > Hello Sheridan Saint-Michel, > > Well it works fine, tnx!!! > > But now i want to understand it too. > > bit_count(bit_or(1< What does bit mean? I thougt "1< bit(e)swich stepsize 1?? > > I creat my sid by: > srand((double)microtime()*100); > $sid = md5(uniqid(rand())); > > a the sid-field as varchar(32) (i realise now, maybe better use char(32)) > (Maybe you will ask why i don't use a auto_increment sid (int(9) or > something like that). Cause I don't want the table will be full ever > (sid>999.999.999)) ACK! Don't do this. You do know that an unsigned int (using a signed int in an auto_increment field is pointless anyway) has a max value of 4294967295, right? To put this into perspective... if you had one million customers, they would have more than 4294 transactions EACH before sid filled up. If you are still worried about running out of numbers in your sid field make it an unsigned bigint. The max value for an unsigned bigint is 18446744073709551615... so that should give you lots of space to play in, and sid will only be 8 bytes per row... not 33 (Also incidentally, if you do want to save an md5 value to a row in the future... use char not varchar as you know it will be 32 bytes and are adding a wasted 33rd byte). (If you need more than 18 Quintillion transactions, which comes out to around 3 billion transactions for EVERY PERSON ON EARTH, please let me know what kind of business you are in... as I am obviously in the wrong one =P ) > Now i thougth bit_count(bit_or(32< doesn't? See my explanation above. All you are trying to do is shift a 1 digit to a different place for each unique value of sid. The above definately won't work if sid is an md5 value as md5 includes a-z characters. > Best regards, > > Bas Again, hope that helps =) Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.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] Re: PHP with Domino Notes
One way to do this is using de ODBC functions, you would have to set up a OBDC conection using the appropiate drivers from lotus. -- == CARLOS AUGUSTO ABARCA B. Web Design Engineer Seguros Bolivar - TBF Sistemas Bogotá D.C., Colombia == "Kiko" <[EMAIL PROTECTED]> escribió en el mensaje 000701c14d1d$e7604180$9737ddc8@yoda">news:000701c14d1d$e7604180$9737ddc8@yoda... > Hi.. > > There is any possibility to work with Domino Notes databases in PHP? > > Thanks, > Kiko > -- 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] updating records in ODBC with cursor
If your drivers suppport Cursors, then sure :) You can download OpenLink's for free - they come with a non-expiring 2-user license. There are 5 different cursor implementations in OpenLink's drivers, from Foward Only through Bidirectional to Dynamic. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -Original Message- > From: m0sh3 [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 05, 2001 12:01 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] updating records in ODBC with cursor > > > is there a way to update records with cursor thru ODBC? > > thanx > > > > > -- > 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] Other ODBC driver besides an openlink one?
Hi Ricky, I wasn't able to find any open support cases for you. If you've had any problems with OpenLink drivers I'd like to know what they are so they can be resolved asap. Our drivers work quite well with Oracle, although there can be problems if database version is not matched exactly. Overall our drivers work quite well with PHP. If there is any issue I can help resolve, please don't hesitate to contact me. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -Original Message- > From: Ricky Theil [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 04, 2001 4:33 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Other ODBC driver besides an openlink one? > > > We have had nothing but problems with our openlink drivers > connecting to an > oracle database from our bug tracking software, so I'm not allowed to use > openlink odbc drivers. Is there another way to set up an odbc > connection to > a linux system using php and odbc??? I know I can do native > connections, but > I'm having a few problems installing oracle on Linux. > > Thanks > > Ricky > -- 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] bitshift
Hello, bit_count(bit_or(1
[PHP-DB] Re: mysql - php DATE QUESTION...
DELETE FROM tablename WHERE DATE_SUB(tablename.datefield, INTERVAL 30 DAY) > NOW() "Koutsogiannopoulos Karolos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Can someone offer some help...? > > Lets say i have a date collumn in a mysql table that includes dates that get > stored each time i enter an entry... > > How can i check when i enter the page that displays the entries to delete > all entries older than 30 days? > > 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]
[PHP-DB] Interbase and php on win2k...
Hello :c) I cant make this work together... I have set up php (it works) I have set up ib (it works) but when i try to query ib using php i get : Fatal error: Call to undefined function: ibase_connect() in c:\inetpub\wwwroot\ib.php on line 10 I have set my extension_dir to (where the dll reside) extension_dir = C:\Servers\PHP\extensions and uncomment my dll: extension=php_interbase.dll Any one know what the broblem could be??? Thanks Christian -- 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: Speeding up database access
I forgot to say, I am using Oracle OCI to access the database: : $sSQL = "select label, text from language_text where language = 'English'"; $stmt = OCIParse($conn,$sSQL); OCIExecute($stmt); $nrows = OCIFetchStatement($stmt,$results); -- 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] Speeding up database access
I am just starting out on a project that has to be multi-lingual. i.e. every word/sentence I output has to be translated. The user logs in, and I read the language they use, by looking at the user record. I then need to get the language translations from a database. I just "select label, text from language where lang = "English"; Fields: [label],[text],[language] Example: "M1002","Please enter the delivery address","English" At the moment I download them into a associative array, so I can access the text like this. txt['M1002'] where 'M1002' is a label. I have made txt a session variable. The trouble is, there are so many text translations (6000+), that it takes about 10 seconds to download them all into this array. I don't want to access the database every time I need to print out some text. Question:- How can I improve the startup time?? In case it was not obvious from the above, I am a newbie at PHP!! -- 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] Sorting a 2 dimension array
Hi, Why don't you sort the query to MYSQL and have the records delivered in the order you want them? HTH Steve At 5:31 PM +0930 5/10/01, John Clarke wrote: >I would like to sort a 2 dimensional array based on the value of one of the >keys of each element. > >I have an array returned from a msql query which contains 10 >records/elements and each record 5 fields/keys. >I would like to sort the records based on the value of a particular field in >each record. > >Is this possible.? I have looked thru all the array functions but cannot >seem to find anything that allows me to do this. > >I dont want to write a separate peice of code to compare all of these >elements and their values and then place them into a new array in the >correct order if there is a simpler way of achieving it. > >Any comments would be greatly appreciated. > >Regards, > >John Clarke > > > >-- >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] -- - "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]
RE: [PHP-DB] Sorting a 2 dimension array
although i've never used it, sounds like you would need to use the uasort() function, and write a custom comparison function - tho don't ask me how to do that :P HTH Beau // -Original Message- // From: John Clarke [mailto:[EMAIL PROTECTED]] // Sent: Friday, 5 October 2001 4:01 PM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Sorting a 2 dimension array // // // I would like to sort a 2 dimensional array based on the // value of one of the // keys of each element. // // I have an array returned from a msql query which contains 10 // records/elements and each record 5 fields/keys. // I would like to sort the records based on the value of a // particular field in // each record. // // Is this possible.? I have looked thru all the array // functions but cannot // seem to find anything that allows me to do this. // // I dont want to write a separate peice of code to compare all of these // elements and their values and then place them into a new array in the // correct order if there is a simpler way of achieving it. // // Any comments would be greatly appreciated. // // Regards, // // John Clarke // // // // -- // 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] Sorting a 2 dimension array
Is ksort() what you're looking for? "Sorts an array by key, maintaining key to data correlations." Robert At 05:31 PM 5/10/2001 +0930, John Clarke wrote: >I would like to sort a 2 dimensional array based on the value of one of the >keys of each element. > >I have an array returned from a msql query which contains 10 >records/elements and each record 5 fields/keys. >I would like to sort the records based on the value of a particular field in >each record. > >Is this possible.? I have looked thru all the array functions but cannot >seem to find anything that allows me to do this. > >I dont want to write a separate peice of code to compare all of these >elements and their values and then place them into a new array in the >correct order if there is a simpler way of achieving it. > >Any comments would be greatly appreciated. > >Regards, > >John Clarke > > > >-- >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] Sorting a 2 dimension array
I would like to sort a 2 dimensional array based on the value of one of the keys of each element. I have an array returned from a msql query which contains 10 records/elements and each record 5 fields/keys. I would like to sort the records based on the value of a particular field in each record. Is this possible.? I have looked thru all the array functions but cannot seem to find anything that allows me to do this. I dont want to write a separate peice of code to compare all of these elements and their values and then place them into a new array in the correct order if there is a simpler way of achieving it. Any comments would be greatly appreciated. Regards, John Clarke -- 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]