[PHP] Php mysql update

2008-12-29 Thread admin
Okay maybe i have just forgot. I am trying to update the database and do a +1 to a int field without pulling the data and adding 1 to it and sticking it back in. Someone refresh me on this please. I think it is something like. $dwsl = mysql_query("UPDATE database set Field='+1' WHERE Criteria='Cr

Re: [PHP] mysql question

2008-12-29 Thread Phpster
The mysql forum is the best place. Note that their holiday schedule may mean some lag in getting answers. Bastien Sent from my iPod On Dec 29, 2008, at 7:51 AM, ann kok wrote: Hi all Do you know any websites for mysql question? I do submit the mysql forum but I would like to have more to

[PHP] mysql question

2008-12-29 Thread ann kok
Hi all Do you know any websites for mysql question? I do submit the mysql forum but I would like to have more to learn Now I have mysql replication question. Thank you __ Ask a question on any topic and get answers from rea

Re: [PHP] mySQL query question

2008-11-16 Thread Jim Lucas
Chris wrote: Jim Lucas wrote: [EMAIL PROTECTED] wrote: Ok, so just that I am clear, you are SELECTing and pulling all the data that you are submitting in the above INSERT statement from the DB initially, then you are only modifying the confirm_number value and then re- submitting all the valu

Re: [PHP] mySQL query question

2008-11-16 Thread Chris
Jim Lucas wrote: [EMAIL PROTECTED] wrote: Ok, so just that I am clear, you are SELECTing and pulling all the data that you are submitting in the above INSERT statement from the DB initially, then you are only modifying the confirm_number value and then re- submitting all the values, as they or

Re: [PHP] mySQL query question

2008-11-15 Thread Jim Lucas
Michael S. Dunsavage wrote: On Fri, 2008-11-14 at 12:46 -0800, Jim Lucas wrote: SELECT @confirm_number AS confirm_number; Are we not SELECTING the column value here? should we be selecting confirm_number as confirm_number? The idea is to give you the number that was used in the INSERT sta

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 12:46 -0800, Jim Lucas wrote: > SELECT @confirm_number AS confirm_number; Are we not SELECTING the column value here? should we be selecting confirm_number as confirm_number? -- Michael S. Dunsavage -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
Jim Lucas wrote: > Michael S. Dunsavage wrote: >> On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote: '{$Comments}', @confirm_number ) >>> The above should be this instead >>> >>> @confirm_number >>> ); >> Even after f

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
Michael S. Dunsavage wrote: > On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote: >>> '{$Comments}', >>> @confirm_number >>> ) >> The above should be this instead >> >> @confirm_number >> ); > > Even after fixing that, nothing gets

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote: > > '{$Comments}', > > @confirm_number > > ) > > The above should be this instead > > @confirm_number > ); Even after fixing that, nothing gets inserted into the database. I've b

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
Jim Lucas wrote: > [EMAIL PROTECTED] wrote: >>> Ok, so just that I am clear, you are SELECTing and pulling all the data >>> that you are submitting in the above INSERT statement from the DB >>> initially, >>> then you are only modifying the confirm_number value and then re- >>> submitting all the

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
[EMAIL PROTECTED] wrote: >> Ok, so just that I am clear, you are SELECTing and pulling all the data >> that you are submitting in the above INSERT statement from the DB >> initially, >> then you are only modifying the confirm_number value and then re- >> submitting all the values, as they origina

Re: [PHP] mySQL query question

2008-11-14 Thread mikesd1
>Ok, so just that I am clear, you are SELECTing and pulling all the data >that you are submitting in the above INSERT statement from the DB >initially, >then you are only modifying the confirm_number value and then re- >submitting all the values, as they originally were, Well, actually when all

Re: [PHP] mySQL query question

2008-11-14 Thread Bastien Koert
On Fri, Nov 14, 2008 at 1:22 PM, <[EMAIL PROTECTED]> wrote: > update contacts set confirm_number = confirm_number + 1 order by >> contact >> >>> desc limit 1 >>> >> > Here is the php query I've been using to send the record in the first > place > > $query="INSERT INTO contacts (first_name, last_na

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
[EMAIL PROTECTED] wrote: >> update contacts set confirm_number = confirm_number + 1 order by >> contact >>> desc limit 1 > > Here is the php query I've been using to send the record in the first > place > > $query="INSERT INTO contacts (first_name, last_name, email, phn_number, > address, city, s

Re: [PHP] mySQL query question

2008-11-14 Thread mikesd1
update contacts set confirm_number = confirm_number + 1 order by contact desc limit 1 Here is the php query I've been using to send the record in the first place $query="INSERT INTO contacts (first_name, last_name, email, phn_number, address, city, state, zip, dates, comments, confirm_number)

Re: [PHP] mySQL query question

2008-11-14 Thread Bastien Koert
On Fri, Nov 14, 2008 at 9:58 AM, <[EMAIL PROTECTED]> wrote: > > > okay I want to pull an integer from a database called confirm_number, > > add 1 and repost it back to the database > > No, you don't want to do that. > :-) > > You are introducing a race condition between TWO users who hit the same

[PHP] mySQL query question

2008-11-14 Thread ceo
> okay I want to pull an integer from a database called confirm_number, > add 1 and repost it back to the database No, you don't want to do that. :-) You are introducing a race condition between TWO users who hit the same page at the same time. They each get, say, 42, and they each pu

Re: [PHP] mySQL query question

2008-11-14 Thread Martijn Korse
I would create a separate table for this (confirmation_numbers or something) with an autoincrement primary key. That way you can simply insert a new record for you contact and then ask (using mysql_insert_id()) what the confirmation number is. This approach is much safer as you can be 100% sure th

Re: [PHP] mySQL query question

2008-11-14 Thread Thodoris
okay I want to pull an integer from a database called confirm_number, add 1 and repost it back to the database here's the code I'm using. $queryconfirm="SELECT confirm_number from contacts ORDER BY contact DESC LIMIT 1"; I assume that you are already aware that if you set the variable

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 08:46 +0100, Jochem Maas wrote: > 1000 + 1 != 10001 > > you might consider setting a default of 1000 or 1 or whatever on > the given > field so it's automatically populated with that number when a contact > record is > created. Sorry. Hit the 0 one to few times. -- Mich

Re: [PHP] mySQL query question

2008-11-13 Thread Jochem Maas
Michael S. Dunsavage schreef: > okay I want to pull an integer from a database called confirm_number, > add 1 and repost it back to the database > > > here's the code I'm using. > > > $queryconfirm="SELECT confirm_number from contacts ORDER BY contact DESC > LIMIT 1"; > $confirmresult=$querycon

Re: [PHP] mySQL query question

2008-11-13 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 00:52 -0600, Micah Gersten wrote: > If you're just adding one, there is no reason to retrieve the data, > process it, and update it. You can just update the number. > http://dev.mysql.com/doc/refman/5.0/en/update.html But, the problem is that the confirm_number is a confirma

Re: [PHP] mySQL query question

2008-11-13 Thread Micah Gersten
If you're just adding one, there is no reason to retrieve the data, process it, and update it. You can just update the number. http://dev.mysql.com/doc/refman/5.0/en/update.html Also, you should read the MySQL manual on default values: http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.h

[PHP] mySQL query question

2008-11-13 Thread Michael S. Dunsavage
okay I want to pull an integer from a database called confirm_number, add 1 and repost it back to the database here's the code I'm using. $queryconfirm="SELECT confirm_number from contacts ORDER BY contact DESC LIMIT 1"; $confirmresult=$queryconfirm; now here's the problem I want to add 1 to

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-26 Thread Carlos Medina
Rob Gould schrieb: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a "wine producer-name" is a word like: Château Bahans Haut-Brion or La Chapelle de La Mission Haut-Brion or Le Clarence

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-24 Thread Colin Guthrie
Robert Cummings wrote: On Fri, 2008-10-24 at 00:18 -0400, Rob Gould wrote: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a "wine producer-name" is a word like: Château Bahans Haut-Brion or

Re: [PHP] PHP/mySQL question using ORDER BY with logic

2008-10-23 Thread Robert Cummings
On Fri, 2008-10-24 at 00:18 -0400, Rob Gould wrote: > Question about mySQL and PHP, when using the mySQL ORDER BY method... > > > Basically I've got data coming from the database where a "wine > producer-name" is a word like: > > Château Bahans Haut-Brion > > or > > L

[PHP] PHP/mySQL question using ORDER BY with logic

2008-10-23 Thread Rob Gould
Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a "wine producer-name" is a word like: Château Bahans Haut-Brion or La Chapelle de La Mission Haut-Brion or Le Clarence de

Re: [PHP] Mysql search

2008-10-23 Thread tedd
At 11:16 PM -0700 10/21/08, Ryan S wrote: Am hoping someone out there can recommend a better script or maybe share some of your own code? Any help would be appreciated. Do it right... read up on MySQL's fulltext matching. Cheers, Rob. Did some searching based on your tip, got what i w

Re: [PHP] Mysql search

2008-10-21 Thread Ryan S
> Am hoping someone out there can recommend a better script or maybe share some > of your own code? > > Any help would be appreciated. Do it right... read up on MySQL's fulltext matching. Cheers, Rob. Did some searching based on your tip, got what i was looking for, just didnt know wher

Re: [PHP] Mysql search

2008-10-21 Thread Robert Cummings
On Tue, 2008-10-21 at 21:48 -0700, Ryan S wrote: > Hey all, > I have two columns in my DB > title varchar(254) > and > jtext text > > which I would like to search, as the user might enter two or more words I am > opting not to use LIKE %search_term% so started searching google, I came > acros

[PHP] Mysql search

2008-10-21 Thread Ryan S
Hey all, I have two columns in my DB title varchar(254) and jtext text which I would like to search, as the user might enter two or more words I am opting not to use LIKE %search_term% so started searching google, I came across this very promising class: http://code.activestate.com/recipes/12

Re: [PHP] MYSQL insert problems

2008-10-17 Thread chris smith
On Sat, Oct 18, 2008 at 3:22 AM, Frank Stanovcak <[EMAIL PROTECTED]> wrote: > I'm using the following code to try and do a simple insert query. However > it won't insert the data into the table, and I get no error messages. What > have I done wrong this time? You will be getting an error. echo

[PHP] MYSQL insert problems

2008-10-17 Thread Frank Stanovcak
I'm using the following code to try and do a simple insert query. However it won't insert the data into the table, and I get no error messages. What have I done wrong this time? $value) { echo $key . ' : ' . $value . ''; }; echo ''; }; mysql_close($connection); include('..\VariableReveal

Re: [PHP] MySQL Workbench coming for Linux

2008-09-16 Thread Jochem Maas
Ross McKay schreef: Posting this here, because a few people responded when I mentioned not having a Linux-native data modelling tool. Apparently, MySQL Workbench should be alpha-ready by end of the month... http://dev.mysql.com/workbench/?p=138 no news of MacOSX, what's the chance this will bu

[PHP] MySQL Workbench coming for Linux

2008-09-16 Thread Ross McKay
Posting this here, because a few people responded when I mentioned not having a Linux-native data modelling tool. Apparently, MySQL Workbench should be alpha-ready by end of the month... http://dev.mysql.com/workbench/?p=138 Maybe I can ditch Visio one day soon... :) -- Ross McKay, Toronto, NSW

Re: [PHP] Maps / Distance / GeoCoding [php/mysql]

2008-09-12 Thread tedd
At 11:51 PM +0100 9/11/08, Nathan Rixham wrote: re: an earlier thread as promised here are some note's on geo-coding using mysql and php (and geoip and distance between points) also worth reading up on wiki about the great circle and associated content! (+openGIS) Won't make sense to all unl

[PHP] Re: Maps / Distance / GeoCoding [php/mysql]

2008-09-11 Thread Nathan Rixham
Nathan Rixham wrote: re: an earlier thread [snip] or you may just need this bit: distance = ACOS( SIN(Y(g.geopoint)*pi()/180)*SIN(Y(l.point)*pi()/180) +COS(Y(g.geopoint)*pi()/180)*COS(Y(l.point)*pi()/180) *COS((X(l.point)-X(g.geopoint))*pi()/180))*6372.795 used to calc the distan

[PHP] Maps / Distance / GeoCoding [php/mysql]

2008-09-11 Thread Nathan Rixham
re: an earlier thread as promised here are some note's on geo-coding using mysql and php (and geoip and distance between points) also worth reading up on wiki about the great circle and associated content! (+openGIS) Won't make sense to all unless you're working with spatial data - if anybod

[PHP] Re: Job opening in Leiden, Netherlands: PHP/MySQL developer

2008-09-01 Thread Manuel Lemos
Hello, on 09/01/2008 09:15 AM Ivo F.A.C. Fokkema said the following: Dear all, We have an immediate job opening available to work in our team of bio-informaticians on extending the LOVD software (www.LOVD.nl). Even if you're still a beginner with PHP you're welcome to respond. Affinity to biolo

[PHP] Job opening in Leiden, Netherlands: PHP/MySQL developer

2008-09-01 Thread Ivo F.A.C. Fokkema
Dear all, We have an immediate job opening available to work in our team of bio-informaticians on extending the LOVD software (www.LOVD.nl). Even if you're still a beginner with PHP you're welcome to respond. Affinity to biology is a big plus. LOVD (Leiden Open Variation Database) is webbased sof

[PHP] Re: RSS Feed using PHP/MySQL errors

2008-08-07 Thread Peter Ford
Don Mak wrote: Trying to create an articles rss feed for my site and I keep getting an error that says: = A semi colon character was expected. Line: 7 Character: 60 http://www.chirunning.com/shop/pages.php?pageid=19&id=383 = This is an easy one: in both of the following lines @mysql_

[PHP] RSS Feed using PHP/MySQL errors

2008-08-06 Thread Don Mak
Trying to create an articles rss feed for my site and I keep getting an error that says: = A semi colon character was expected. Line: 7 Character: 60 http://www.chirunning.com/shop/pages.php?pageid=19&id=383 = I've tried every way imaginable to figure out why I am getting this error, fina

Re: [PHP] PHP + MySQL transactions

2008-05-25 Thread Chris
>> See http://dev.mysql.com/doc/refman/5.0/en/savepoints.html >> >> The situation might not come up but it can't hurt to have it already >> built in "just in case". > > This doesn't appear deal with *nested transactions.* It appears that it > will use a single transaction and you can just save up

Re: [PHP] PHP + MySQL transactions

2008-05-23 Thread Philip Thompson
On May 22, 2008, at 7:25 PM, Chris wrote: Philip Thompson wrote: Hi all. I'm currently working on a project that's in its beta stage. Due to time restraints, we were unable to build in transactions from the beginning. Well, we're getting to the point where we can now put in transactions.

Re: [PHP] PHP + MySQL transactions

2008-05-22 Thread Chris
Philip Thompson wrote: > Hi all. > > I'm currently working on a project that's in its beta stage. Due to time > restraints, we were unable to build in transactions from the beginning. > Well, we're getting to the point where we can now put in transactions. > Basically, I'm curious to find out your

[PHP] PHP + MySQL transactions

2008-05-22 Thread Philip Thompson
Hi all. I'm currently working on a project that's in its beta stage. Due to time restraints, we were unable to build in transactions from the beginning. Well, we're getting to the point where we can now put in transactions. Basically, I'm curious to find out your opinion on the best way t

RE: [PHP] php mysql live feed

2008-05-21 Thread tedd
Hi: The following could be taken from MySQL just as well: http://webbytedd.com/b/timed-php/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] php mysql live feed

2008-05-21 Thread admin
Todd I want to thank you. You sent me thinking in the right direction to resolving this issue. I now have successfully created a live Pika Card status GUI using PHP, MYSQL, AJAX. The key word in what you said was unique function. I was not thinking to write a function. I was looking for the

RE: [PHP] php mysql live feed

2008-05-21 Thread Boyd, Todd M.
essage- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 20, 2008 3:25 PM > To: php-general@lists.php.net > Subject: [PHP] php mysql live feed > > Okay before i pull more hair out... > > I am trying to use php to pull mysql data and refresh the mys

Re: [PHP] php mysql live feed

2008-05-20 Thread Richard Heyes
[EMAIL PROTECTED] wrote: Okay before i pull more hair out... I am trying to use php to pull mysql data and refresh the mysql data every say 5 seconds for like a live display of the database without the screen reloading. I want the data to refresh but not the screen. Ajax seems to hate me becaus

Re: [PHP] php mysql live feed

2008-05-20 Thread Kyle Browning
Check out jQuery. http://jquery.com On May 20, 2008, at 1:24 PM, [EMAIL PROTECTED] wrote: Okay before i pull more hair out... I am trying to use php to pull mysql data and refresh the mysql data every say 5 seconds for like a live display of the database without the screen reloading. I

[PHP] php mysql live feed

2008-05-20 Thread admin
Okay before i pull more hair out... I am trying to use php to pull mysql data and refresh the mysql data every say 5 seconds for like a live display of the database without the screen reloading. I want the data to refresh but not the screen. Ajax seems to hate me because everything i have seen/

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-11 Thread Shawn McKenzie
Rahul P wrote: Ok I removed mysql using yum remove mysql. But is there a special way to tell yum to install that version of mysql? On Sun, May 11, 2008 at 12:44 AM, Rahul P <[EMAIL PROTECTED]> wrote: On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: On Sun, May 11, 2

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:59 AM, Rahul P <[EMAIL PROTECTED]> wrote: > Ok. I apologize for the mix. When I'm mailing someone, I simply don't get > Google into mind. :) > no problem, if it were emerge id be much more capable of helping ;) -nathan

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Ok. I apologize for the mix. When I'm mailing someone, I simply don't get Google into mind. :) Thanks, Rahul On Sun, May 11, 2008 at 12:53 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 1:46 AM, Rahul P <[EMAIL PROTECTED]> wrote: > >> Ok I removed mysql using yum remove my

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:46 AM, Rahul P <[EMAIL PROTECTED]> wrote: > Ok I removed mysql using yum remove mysql. But is there a special way to > tell yum to install that version of mysql? ahh, this is where google comes in for sure. it looks like you could download an older rpm, like from mysql

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Ok I removed mysql using yum remove mysql. But is there a special way to tell yum to install that version of mysql? On Sun, May 11, 2008 at 12:44 AM, Rahul P <[EMAIL PROTECTED]> wrote: > > > On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]> > wrote: > >> On Sun, May 11, 2008 at 1

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote: > >> Oh... This is the fourth time I'm doing that except that this time yum >> installed mysql6 instead of older versions... I don't see any way out other

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote: > Oh... This is the fourth time I'm doing that except that this time yum > installed mysql6 instead of older versions... I don't see any way out other > than reinstalling the OS itself... There are so many dependency failures

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Oh... This is the fourth time I'm doing that except that this time yum installed mysql6 instead of older versions... I don't see any way out other than reinstalling the OS itself... There are so many dependency failures I'm spending more time troubleshooting than actually coding something :) O

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:22 AM, Rahul P <[EMAIL PROTECTED]> wrote: > Thanks. I just stopped mysql and when I try to start it again it throws > another set of errors: > > chown: changing ownership of `/home-public/mysql6': Operation not permitted > > So I guess something is messed up completely. I

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Thanks. I just stopped mysql and when I try to start it again it throws another set of errors: chown: changing ownership of `/home-public/mysql6': Operation not permitted So I guess something is messed up completely. I wish I installed it better. Now the installing is messed up I guess with all s

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:05 AM, Rahul <[EMAIL PROTECTED]> wrote: > I have recorded both the errors by changing the variable: > > $host = "mycomputer.webaddress.com" > > PHP Warning: mysql_connect(): Lost connection to MySQL server during query > in /export/home/rpo219/may/conf_global.php on line

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul
com works when I use with mysql like this: mysql -h mycomputer.webaddress.com -u root -p Thank You Nathan Nobbe wrote: On Sun, May 11, 2008 at 12:30 AM, Rahul <[EMAIL PROTECTED]> wrote: I am using Fedora Core 4. As I was unable to use PHP or MySQL together, I uninstalled both of them and i

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 12:42 AM, Rahul <[EMAIL PROTECTED]> wrote: > Thanks a lot for your reply. > > I have tried using > > $host = "localhost"; > $db = "dbname"; > $table_main = "tablename"; > $dbusername = "root"; > $dbpass = "passhere"; > > mysql_connect($host, $dbusername, $dbpass) or die(mys

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Rahul
mysql -h mycomputer.webaddress.com -u root -p Thank You Nathan Nobbe wrote: On Sun, May 11, 2008 at 12:30 AM, Rahul <[EMAIL PROTECTED]> wrote: I am using Fedora Core 4. As I was unable to use PHP or MySQL together, I uninstalled both of them and installed again using the following co

Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Nathan Nobbe
t install php php-devel php-gd php-imap php-ldap php-mysql php-odbc > php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick > > And then started the mysql server. > > I am able to connect to the server from the console my typing > > mysql -h -u root -p > &

[PHP] Re: PHP-MYSQL Error: Can't connect to MySQL socket. Can someone helpme out please?

2008-05-10 Thread Rahul
unable to use PHP or MySQL together, I uninstalled both of them and installed again using the following commands: yum install mysql And then apt-get install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick And

[PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Rahul
I am using Fedora Core 4. As I was unable to use PHP or MySQL together, I uninstalled both of them and installed again using the following commands: yum install mysql And then apt-get install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-08 Thread Chris
Sanjeev N wrote: > Hi Jim Lucas, > > You are correct... i want to run in the same way. > > but as my 2 tables, column name are different i cant run the LOAD DATA > infile. If you're inserting the same data, then use LOAD DATA INFILE to load it into a temporary table, then use INSERT SELECT's to

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-08 Thread Sanjeev N
Hi Jim Lucas, You are correct... i want to run in the same way. but as my 2 tables, column name are different i cant run the LOAD DATA infile. And the example you mentioned for break at 100, also i thought to use in that way. but one of the column had the text type which we cant predict about th

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Chris
Jim Lucas wrote: > Waynn Lue wrote: >> Wouldn't using LOAD DATA INFILE be better than writing your own script? >> > > depends, does the data file match the table column for column? Doesn't have to. http://dev.mysql.com/doc/refman/5.0/en/load-data.html By default, when no column list is provided

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Jim Lucas
Waynn Lue wrote: Wouldn't using LOAD DATA INFILE be better than writing your own script? depends, does the data file match the table column for column? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Waynn Lue
Wouldn't using LOAD DATA INFILE be better than writing your own script? On 5/1/08, Jim Lucas <[EMAIL PROTECTED]> wrote: > Jim Lucas wrote: > > Sanjeev N wrote: > >> Hi, > >> I have written a program which imports the tab delimited file and > >> insert all > >> the line from file to the mysql lin

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Jim Lucas
Jim Lucas wrote: Sanjeev N wrote: Hi, I have written a program which imports the tab delimited file and insert all the line from file to the mysql line by line. I am succeding in the above case. but problem with the above method is its taking to too much time while inserting into the databas

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Jim Lucas
Sanjeev N wrote: Hi, I have written a program which imports the tab delimited file and insert all the line from file to the mysql line by line. I am succeding in the above case. but problem with the above method is its taking to too much time while inserting into the database. The file's size wil

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Wolf
Sanjeev N <[EMAIL PROTECTED]> wrote: > Hi, > I have written a program which imports the tab delimited file and insert all > the line from file to the mysql line by line. > I am succeding in the above case. but problem with the above method is its > taking to too much time while inserting int

[PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Sanjeev N
Hi, I have written a program which imports the tab delimited file and insert all the line from file to the mysql line by line. I am succeding in the above case. but problem with the above method is its taking to too much time while inserting into the database. The file's size will be more than 5000

Re: [PHP] PHP MySQL Insert Syntax

2008-04-01 Thread kvigor
Thanks :-) <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Insert is for a new row > > Alter or Update is for an exsisting row > > > > > > /*I'm trying to insert values from an array into MySQL DB but the insert > begins at the last record in the table and not at first record in th

RE: [PHP] PHP MySQL Insert Syntax

2008-04-01 Thread admin
Insert is for a new row Alter or Update is for an exsisting row /*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table. I have added the cellSuffixes column after I already populated 30 records in ot

[PHP] PHP MySQL Insert Syntax

2008-04-01 Thread kvigor
/*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table. I have added the cellSuffixes column after I already populated 30 records in other columns*/ Code: foreach($list as $key=>$value) { $query = "IN

Re: [PHP] mysql joins

2008-03-25 Thread Wolf
Steven Macintyre <[EMAIL PROTECTED]> wrote: > I have three tables, namely; > > User > - UID > - Firstname > - Surname > - Tel > - Cell > - Email > > Tracker > - UID > - Points > > Winners > - UID > - Datetime (-00-00 00:00:00) > > I need to get the following information from the

RES: [PHP] mysql joins

2008-03-25 Thread Thiago Pojda
09:21 Para: php-general@lists.php.net Assunto: [PHP] mysql joins I have three tables, namely; User - UID - Firstname - Surname - Tel - Cell - Email Tracker - UID - Points Winners - UID - Datetime (-00-00 00:00:00) I need to get the following information from the above tables (in my lo

Re: [PHP] mysql joins

2008-03-25 Thread Andrew Ballard
On Tue, Mar 25, 2008 at 8:20 AM, Steven Macintyre <[EMAIL PROTECTED]> wrote: > I have three tables, namely; > > User > - UID > - Firstname > - Surname > - Tel > - Cell > - Email > > Tracker > - UID > - Points > > Winners > - UID > - Datetime (-00-00 00:00:00) > > I need to get th

[PHP] mysql joins

2008-03-25 Thread Steven Macintyre
I have three tables, namely; User - UID - Firstname - Surname - Tel - Cell - Email Tracker - UID - Points Winners - UID - Datetime (-00-00 00:00:00) I need to get the following information from the above tables (in my logical sense) All users from user with sum(points) as points and d

[PHP] MySQL Group?

2008-03-19 Thread John Taylor-Johnston
Does anyone know of a good MySQL group? I want to make a relational link from `data` to `shopping` so when I insert a new record in `shopping`, I will see the contents of `data`.`name` and `data`.`email` as a drop-down menu in `shopping`. Where does one go to get this kind of help? Thanks, Joh

Re: [PHP] Good PHP/MySql starter book?

2008-03-03 Thread Wolf
JJB <[EMAIL PROTECTED]> wrote: > Hello, > > Can anyone recommend a good book for getting started with PHP/MySql from > the perspective of writing some basic intranet applications? > > - Joel > I personally found the Sam's "Teach yourself Apache, PH

[PHP] Good PHP/MySql starter book?

2008-03-03 Thread JJB
Hello, Can anyone recommend a good book for getting started with PHP/MySql from the perspective of writing some basic intranet applications? - Joel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mysql vs. Mysqli crash handling

2008-02-25 Thread Larry Garfield
On Monday 25 February 2008, Daniel Brown wrote: > On Mon, Feb 25, 2008 at 3:07 PM, Larry Garfield <[EMAIL PROTECTED]> wrote: > > Hi folks. I've an odd issue. > > Only fair. You're an odd bird, and we're an odd bunch. ;-P > > > If I connect to a MySQL DB using ext/mysql, and for whatever r

Re: [PHP] Mysql vs. Mysqli crash handling

2008-02-25 Thread Daniel Brown
On Mon, Feb 25, 2008 at 3:07 PM, Larry Garfield <[EMAIL PROTECTED]> wrote: > > Hi folks. I've an odd issue. Only fair. You're an odd bird, and we're an odd bunch. ;-P > If I connect to a MySQL DB using ext/mysql, and for whatever reason the > process dies (uncaught exception, fatal erro

[PHP] Mysql vs. Mysqli crash handling

2008-02-25 Thread Larry Garfield
Hi folks. I've an odd issue. If I connect to a MySQL DB using ext/mysql, and for whatever reason the process dies (uncaught exception, fatal error, etc.) the connection is garbage collected and closed. If, however, I use ext/mysqli, the connection remains open forever and just eats up reso

Re: [PHP] mysql test and error

2008-02-25 Thread Daniel Brown
On Sun, Feb 24, 2008 at 5:00 PM, hE <[EMAIL PROTECTED]> wrote: > The following program gave the error: > > "Parse error: parse error in C:\apache\htdocs\mysqltest.php on line 10" Look at this part of the code: $result = mysql_query($sql); if ($result == 0) echo 'Error ' . mysql_errno() . ':

Re: [PHP] mysql test and error

2008-02-24 Thread Brady Mitchell
On Feb 24, 2008, at 200PM, hE wrote: The following program gave the error: "Parse error: parse error in C:\apache\htdocs\mysqltest.php on line 10" Did you copy/paste the code? If so maybe the quotation marks are the fancy "smart quotes" like MS Office likes to use. Try replacing your q

Re: [PHP] mysql test and error

2008-02-24 Thread hE
The following program gave the error: "Parse error: parse error in C:\apache\htdocs\mysqltest.php on line 10" Test MySQL Error ' . mysql_errno() . ': '. mysql_error() . ''; else { ?> Variable_nameValue '; $row_array = mysql_fetch_row($result); for ($j = 0; $j < mysql_num_fields($result);

Re: [PHP] mysql test and error

2008-02-24 Thread Brady Mitchell
On Feb 24, 2008, at 1135AM, hE wrote: hi, I found an e-book in the net about php and mysql and with its sample program I am trying to test whether I have mysql working correctly or not. the following program gives error message. why? What exactly does the error message say? We can help tr

[PHP] mysql test and error

2008-02-24 Thread hE
hi, I found an e-book in the net about php and mysql and with its sample program I am trying to test whether I have mysql working correctly or not. the following program gives error message. why? Test MySQL Error “ . mysql_errno() . “: “ . mysql_error() . “”; else { ?> Variable_nameValue

Re: [PHP] MySQL Stored Procedures

2008-02-19 Thread Chris
my only wish was that more people wrote more articles about the proper structure. You mean like the example on the mysql website? http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www

RE: [PHP] mysql input

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 10:19 pm, Bastien Koert wrote: > mysql_real_escape_string() Yes. > addslashes() No, not right for different charsets. See above. > htmlentities() Completely and wildly inappropriate. Might as well use a cannon to slice a tomato. -- Some people have a "gift" link he

<    1   2   3   4   5   6   7   8   9   10   >