[PHP-DB] Fw: search question
Hi, Is there any other efficient way (--except using LIKE)of searching a keyword in mysql ... thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Getting a list of MSSQL databases
Thanks That will work for me Dan Ryan Jameson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I believe you'll have to do this: select * from master.sysdatabases :-) Ryan -Original Message- From: Dan Healy [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 15, 2002 9:08 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Getting a list of MSSQL databases Hi, Is there a command similar to mysql_list_dbs for MS SQL? Thanks Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] search question
it depends on how you design your database. When I know I will have this situation, I design a table named keyWords. Put one work per record and assign each word an ID number. Then I create a join table between keyWords and whatever table they relate to. The join table only contains 2 fields, the pk from keyWords and the pk from the other table. Then I ad 1 record to the join table for each keyword that relates to each record in the other table. It's simple then to join the 3 tables in such a manner as to quickly find the records in the other table that relate to a specific key word. HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 3:20 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] search question Hi, Is there any other efficient way (--except using LIKE)of searching a keyword in mysql ... thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] search question
You could check out the FULLTEXT searching in MySQL, too. It's in the manual. It has some quirks, but works well on a large database. ---John Holmes... -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 8:04 AM To: Meltem Demirkus; [EMAIL PROTECTED] Subject: RE: [PHP-DB] search question it depends on how you design your database. When I know I will have this situation, I design a table named keyWords. Put one work per record and assign each word an ID number. Then I create a join table between keyWords and whatever table they relate to. The join table only contains 2 fields, the pk from keyWords and the pk from the other table. Then I ad 1 record to the join table for each keyword that relates to each record in the other table. It's simple then to join the 3 tables in such a manner as to quickly find the records in the other table that relate to a specific key word. HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 3:20 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] search question Hi, Is there any other efficient way (--except using LIKE)of searching a keyword in mysql ... thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Trying to speed up php output from mysql
Does your process hang or simply is too long? Perhaps the limiting factor is not the writing speed, but a memory requirement problem. Try to compute how long it should take: - do your row processing after a SELECT ... LIMIT 1000 clause - time how long it takes, and extrapolate Then you will know. Ignatius - Original Message - From: Phin Pope [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 1:04 PM Subject: [PHP-DB] Trying to speed up php output from mysql Hi, I've got a script that I've written that writes out a xml file from mysql via php. The file should contain 250,000 xml style records, but it takes so long to generate the file the process has to be stopped before complete. I can't use mysqldump because of some of the processing that is required on the fields after they are extracted. Is there a faster way to write to a file than fwrite() or any other bright ideas? Phin \\\___/// \\ - - // ( @ @ ) +oOOo-(_)-oOOo-+ | phin pope - [EMAIL PROTECTED] | | Created for the benefit of all life | | Web Development and Creative Insight | | Webnetism Tel: +44 1452 855222 | +-Oooo-+ oooO ( ) ( )) / \ ((_/ \_) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.389 / Virus Database: 220 - Release Date: 16/09/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] to determine how much server space left on the webserver?
?php exec(df -h); ? On Tue, 17 Sep 2002, Bo wrote: Any ideas of how to write a php script to determine the disk space left in my account at my web server? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] to determine how much server space left on the webserver?
?php echo `quota -v`; ? this works here. On Tue, 17 Sep 2002, Bo wrote: Any ideas of how to write a php script to determine the disk space left in my account at my web server? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php +-+ |Rafael Mueller | |Computação - UFSC| |Linux User #271799 | |UIN #97699276| |Dividir para conquistar! | +-+ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] to determine how much server space left on the webserver?
actually make that system(df -h); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] input 's id and name -- question...
does the id attribute of an input tag override the name attribute when trying to pull these vales on a subsequent php page? Does it make any difference? I ask cause I'm now PHP-ifing a form I designed in Dreamweaver and it added ids attributes all over the place. Wonder if I should edit them, delete them, etc... ??? Thanks! ~ Mike -- Mike Zornek | Project Leader Apple Student Developers The Insanely Great Site with the Insanely Long URL http://www.applestudentdevelopers.org Personal Site: http://www.mikezornek.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] onnecting to MSSQL database from Linux?
I have PHP4 and freetds installed and I am trying to connect to a mssql server. The problem I am having is that the mssql_connect() call generates the following error: Fatal error: Call to undefined function: mssql_connect() Is there something I need to require? Thanks, Avi -- Avi Schwartz Universe-watching, like golf and aging, [EMAIL PROTECTED] promotes humility - William R. Everdell -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Fw: search question
http://www.mysql.com/doc/en/Fulltext_Search.html On Tue, 17 Sep 2002 20:34:37 +1200, Meltem Demirkus wrote: Hi, Is there any other efficient way (--except using LIKE)of searching a keyword in mysql ... thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP and Mail under Apache Windows?
Hi there everyone, I've just setup Apache 2.0 under Windows XP and LOVE it, PHP and MySQL work fine and people are saying how fast the server is. However, I am stumped on one thing - how the heck does I set it up so Mail will work? With my old server (Linux) it was already configured, but from what I understand I have to do something to get it to send mail from Apache/PHP now? As a note, under linux I used sendmail. Please help, I am so confused I don't know where to start to get the mail working. Thanks for everything Regards Chris Payne
[PHP-DB] Re: onnecting to MSSQL database from Linux?
It means you haven't compiled mysql support into php. Recompile it using --with-mysql -- Jason Morehouse (jm[@]netconcepts[.]com) Auckland, New Zealand Linux: Because rebooting is for adding hardware. On Tue, 17 Sep 2002 15:30:29 +, Avi Schwartz wrote: I have PHP4 and freetds installed and I am trying to connect to a mssql server. The problem I am having is that the mssql_connect() call generates the following error: Fatal error: Call to undefined function: mssql_connect() Is there something I need to require? Thanks, Avi -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: onnecting to MSSQL database from Linux?
He's using microsoft sql server, not mysql. try --with-mssql maybe? Adam On Wed, 18 Sep 2002, Jason Morehouse wrote: It means you haven't compiled mysql support into php. Recompile it using --with-mysql -- Jason Morehouse (jm[@]netconcepts[.]com) Auckland, New Zealand Linux: Because rebooting is for adding hardware. On Tue, 17 Sep 2002 15:30:29 +, Avi Schwartz wrote: I have PHP4 and freetds installed and I am trying to connect to a mssql server. The problem I am having is that the mssql_connect() call generates the following error: Fatal error: Call to undefined function: mssql_connect() Is there something I need to require? Thanks, Avi -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: onnecting to MSSQL database from Linux?
I did build it with --with-sybase, but then I forgot to install the new version. Face turning red... Sorry for the false alarm. It now works like a charm. Avi Adam Williams wrote: He's using microsoft sql server, not mysql. try --with-mssql On Wed, 18 Sep 2002, Jason Morehouse wrote: It means you haven't compiled mysql support into php. Recompile it using --with-mysql On Tue, 17 Sep 2002 15:30:29 +, Avi Schwartz wrote: I have PHP4 and freetds installed and I am trying to connect to a mssql server. The problem I am having is that the mssql_connect() call generates the following error: Fatal error: Call to undefined function: mssql_connect() -- Avi Schwartz Universe-watching, like golf and aging, [EMAIL PROTECTED] promotes humility - William R. Everdell -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Read Receipts
Just a small suggestion guys, but when posting messages to a mailling list, it's always a *good* idea to turn off the Read Request option!!! Thanks, -gav. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Selecting one random column from MySQL
Hi all, How can I select one random column from a MySQL table? Thanks, Taj -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] input 's id and name -- question...
nope - an id is used for other things (like javascript, style sheets, DHTML etc). They shouldn't affect your variable names. HTH Beau // -Original Message- // From: Michael Zornek [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 18 September 2002 6:41 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] input 's id and name -- question... // // // does the id attribute of an input tag override the name // attribute when // trying to pull these vales on a subsequent php page? Does it make any // difference? // // I ask cause I'm now PHP-ifing a form I designed in // Dreamweaver and it added // ids attributes all over the place. Wonder if I should edit // them, delete // them, etc... ??? // // Thanks! // // ~ Mike // -- // Mike Zornek | Project Leader // Apple Student Developers // The Insanely Great Site with the Insanely Long URL // http://www.applestudentdevelopers.org // // Personal Site: // http://www.mikezornek.com // // // -- // PHP Database Mailing List (http://www.php.net/) // To unsubscribe, visit: http://www.php.net/unsub.php // -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Resubmit on page refresh.
I have a page that maintains a very simple list of items. The page shows the current items on the list and provides an input field for the user to add new items to the list. Everything works great. The only problem I'm having is that each time the user clicks the Refresh button on the browser, I get that dialog box telling me The page cannot be refreshed without sending the information. Then the last value is added to the database again and again and again each time the user hits the Refresh button. In know that's a browser feature that I can't control, but is there a way that after submitting the information to the database using the form and associated SQL statements, I can unset the variables. I've already tried unset($sql) and unset($variable), but to no avail. Here's the php code from the top of the page: if (isset($_POST[newStatus])) { $thisStatus=addslashes($_POST[newStatus]); $addStatusSQL=INSERT INTO status values(Null,'$thisStatus'); mysql_query($addStatusSQL) or die(mysql_error()); unset($_POST[newStatus]); unset($addStatusSQL); } . . . Many wondrous things happen in here... . . . And here's the form code from the bottom of the page: form action=bookStatAdmin.php method=post table trtdinput type=text name=newStatus/input/td/tr trtdnbsp;/td/tr trtdinput type=submit name=submit/input/td/tr /table /form Any suggestions? Thank in advance. Rich -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Selecting one random column from MySQL
How can I select one random column from a MySQL table? You can't, in one query. You can use the MySQL_ function to get a list of all the columns, though, and then use PHP to select a random column and construct an SQL statement. If you need to do something like this, though, there is something wrong in your database schema... ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Resubmit on page refresh.
I really hope you just subscribed, because this question already been asked today...and yesterday... You should search the archive before you post. Anyhow, the solution to your problem can be solved by using a processing page that does the insert into the database and then redirects to the main page that shows the list. The processing page should not display anything at all, just do the insert and redirect. Then the refresh will just refresh the page it was redirect to, and have nothing to do with the processing. ---John Holmes... -Original Message- From: Rich Hutchins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 9:49 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Resubmit on page refresh. I have a page that maintains a very simple list of items. The page shows the current items on the list and provides an input field for the user to add new items to the list. Everything works great. The only problem I'm having is that each time the user clicks the Refresh button on the browser, I get that dialog box telling me The page cannot be refreshed without sending the information. Then the last value is added to the database again and again and again each time the user hits the Refresh button. In know that's a browser feature that I can't control, but is there a way that after submitting the information to the database using the form and associated SQL statements, I can unset the variables. I've already tried unset($sql) and unset($variable), but to no avail. Here's the php code from the top of the page: if (isset($_POST[newStatus])) { $thisStatus=addslashes($_POST[newStatus]); $addStatusSQL=INSERT INTO status values(Null,'$thisStatus'); mysql_query($addStatusSQL) or die(mysql_error()); unset($_POST[newStatus]); unset($addStatusSQL); } . . . Many wondrous things happen in here... . . . And here's the form code from the bottom of the page: form action=bookStatAdmin.php method=post table trtdinput type=text name=newStatus/input/td/tr trtdnbsp;/td/tr trtdinput type=submit name=submit/input/td/tr /table /form Any suggestions? Thank in advance. Rich -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: oscommerce
Yes, it is an amazing project. The main team of developers are very talented and there are new contributions made daily. Checkout the snapshot release, it's extremely feature packed. It is by far the best shop system I have ever dealt with, let alone being open source, good stuff. http://oscommerce.com/ -Tim Tony Kuntz [EMAIL PROTECTED] wrote in message 01c259ef$9c7eb2c0$[EMAIL PROTECTED]">news:01c259ef$9c7eb2c0$[EMAIL PROTECTED]... Has anyone on this list had any experience working with oscommerce? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] question regarding date format
Jim, Mike : thanks for reply. getting desire result with strtotime. John, yess u r right. sometimes in my script date is coming from database. in that case, use of DATE_FORMAT() is the best option. thanks smita. From: Ford, Mike [LSS] [EMAIL PROTECTED] To: 'Smita Manohar' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP-DB] question regarding date format Date: Mon, 16 Sep 2002 18:40:06 +0100 -Original Message- From: Smita Manohar [mailto:[EMAIL PROTECTED]] Sent: 16 September 2002 18:11 hi all, a simple question regarding date, but i stuck with it . havin a variable containing date as, $date_test = 2002-08-02; now i want it should be printed like, August 02, 2002 i am doing this with the funcion : echo date(F d, Y, $date_test); but getting a strange result as, January 01, 1970 The date() function takes a timestamp as its second argument, so you have to convert your textual date before passing it to date(). With the format you have, strtotime should work, so try date(F d, Y, strtotime($date_test)) (P.S. You get January 01, 1970 because PHP converts 2002-08-02 to the number 2002 before passing it to date() -- and this represents about 0:33 on that date!) Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php