Re: [PHP-DB] mysql databases

2006-10-14 Thread Bastien Koert
whynot keep all and just sort/limit them to get the data you want? bastien From: "bob plano" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: Re: [PHP-DB] mysql databases Date: Sat, 14 Oct 2006 12:47:38 -0500 sorry, i meant that i wanted to remove the oldest entry and pu

Re: [PHP-DB] mysql databases

2006-10-14 Thread Niel Archer
Hi Bob First you would need a means of identifying your oldest entry, some kind of Date-Time field would seem simplest. Then, one way, would be to SELECT the oldest value and use it in the 'where' clause of an UPDATE. SELECT MIN(stamp) FROM table; will get the oldest date-time value and UPDAT

Re: [PHP-DB] mysql databases

2006-10-14 Thread bob plano
sorry, i meant that i wanted to remove the oldest entry and put in a new entry with UPDATE or INSERT. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mysql databases

2006-10-13 Thread Niel Archer
Hi > He means that he wants to use REPLACE and take out the old entry and update > it with a new one. Although, you would probably use UPDATE instead. Hmmm... Thought this was DB list, not mind-readers. I would also *guess* that would be the intention, but his example seems to remove the newest e

Re: [PHP-DB] mysql databases

2006-10-13 Thread Dave W
He means that he wants to use REPLACE and take out the old entry and update it with a new one. Although, you would probably use UPDATE instead. -- Dave W

Re: [PHP-DB] mysql databases

2006-10-13 Thread Niel Archer
Hi Bob Your question isn't very clear. Do you want to remove the oldest entry, newest, or is there some other criteria to diceide? Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] mysql databases

2006-10-13 Thread bob plano
how would you add something new into a table and take out something old? example: (1) 1st something (2) 2nd something (3) 3rd something (4) 4th something and then you add in something new so then the table would look like (1) new something (2) 1st something (3) 2nd something (4) 3rd something

RE: [PHP-DB] mysql ORDER BY problems

2006-06-18 Thread Bastien Koert
(fieldname as integer) from table where ... order by ... bastien From: "Rob W." <[EMAIL PROTECTED]> To: Subject: [PHP-DB] mysql ORDER BY problems Date: Sun, 18 Jun 2006 17:19:03 -0500 Ok, here's what i got in my mysql db. I got a table listed with numbers as follows 1 2 3 4

[PHP-DB] mysql ORDER BY problems

2006-06-18 Thread Rob W.
Ok, here's what i got in my mysql db. I got a table listed with numbers as follows 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 25 These numbers I can display fine. I'm using .. $query="SELECT * FROM db ORDER BY numbers ASC"; Right now it displays it as 1 10 11 12 . 2 22 23 25 ...

Re: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread Bastien Koert
test both and let us know bastien From: "Andrew Darby" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: Re: [PHP-DB] MySQL/PHP Left Join Question Date: Thu, 25 May 2006 12:33:15 -0400 Thanks to Bastien and TG for their suggestions. I'd been looking at it Basti

Re: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread Andrew Darby
Thanks to Bastien and TG for their suggestions. I'd been looking at it Bastien's way, but TG's is probably better suited to what I want to do. I'd forgotten about that possibility, cramming it all into an array . . . . Again, thanks for the help, Andrew p.s. I'd be curious about the relative

Re: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread Brad Bonkoski
Some good examples of how to deal with this in PHP have already been given, especially the associative array solution. The question I have is with something like this, how do you weight out the pros/cons of code development versus speed? i.e. for code development breaking the logic up into 2 qu

RE: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread Bastien Koert
$rows['title'].""; $oldDVD = $rows['title']; } //echo out the rest of the data echo "".$rows['comment'].""; } hth Bastien From: "Andrew Darby" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] MySQL/PHP

Re: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread tg-php
One thing I've done in situations like this is just load your returned DB data into an array. Something like this would do: $dvdarr[$result['call_number']]['Title'] = $result['title']; $dvdarr[$result['call_number']]['Publisher'] = $result['publisher']; $dvdarr[$result['call_number']]['Comments

[PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread Andrew Darby
Hello, all. I don't know if this is a php-mysql question or just a mysql, but here goes: I have a list of DVDs that my library loans out, and I'd like to allow people to add comments to each item. Since this list gets regenerated periodically (it's extracted from another system, the library cat

Re: [PHP-DB] mysql searching with fulltext indexing

2006-05-24 Thread Bevan Christians
thanks muchly for the help guys :D On 24/05/06, Chris <[EMAIL PROTECTED]> wrote: > Anyone have any idea how i can query the tables in order to get it to > return the indexes show indexes from tablename; http://dev.mysql.com/doc/refman/5.0/en/show-index.html -- Postgresql & php tutorials http:

Re: [PHP-DB] mysql searching with fulltext indexing

2006-05-24 Thread Chris
Anyone have any idea how i can query the tables in order to get it to return the indexes show indexes from tablename; http://dev.mysql.com/doc/refman/5.0/en/show-index.html -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubsc

Re: [PHP-DB] mysql searching with fulltext indexing

2006-05-24 Thread Stut
Bevan Christians wrote: Is there any to query a mysql table to get it to return the field names that it currently has marked as Fulltext Indexes? |SHOW COLUMNS FROM sometable -Stut | -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] mysql searching with fulltext indexing

2006-05-24 Thread Bevan Christians
Hi Listies I have a question Is there any to query a mysql table to get it to return the field names that it currently has marked as Fulltext Indexes? I need to build a searching engine, there are 60 tables being searched, i have created the fulltext indexes on all tables required and i current

Re: [PHP-DB] MySQL: Load Data Infile

2006-05-17 Thread dpgirago
>> LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...); Syntax isn't quite correct with field and line terminators specified. >> >> You must also specify a column list if the order of the fields in the input >> file differs from the order of the columns in the table. Otherwise

Re: [PHP-DB] MySQL: Load Data Infile

2006-05-16 Thread dpgirago
>Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]: >> I'm trying to use the load data infile syntax within a php script. The data >> is in csv format. I was under the impression that I could reorder the >> fields during the insert, such as: >> "load data infile 'currentData.txt' into tabl

Re: [PHP-DB] MySQL: Load Data Infile

2006-05-16 Thread Oliver Block
Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]: > Greets, > > I'm trying to use the load data infile syntax within a php script. The data > is in csv format. I was under the impression that I could reorder the > fields during the insert, such as: > "load data infile 'currentData.txt' int

[PHP-DB] MySQL: Load Data Infile

2006-05-16 Thread dpgirago
Greets, I'm trying to use the load data infile syntax within a php script. The data is in csv format. I was under the impression that I could reorder the fields during the insert, such as: "load data infile 'currentData.txt' into table(fieldName2, fieldName1) fields terminated by ','"; The stuff

[PHP-DB] MySQL + MySQLi with PHP 5.1.3 ./configure errors

2006-05-03 Thread NickPoole
Hi, I've been searching all day through all the reasources i can find for a pointer in the right direction. I've just started a clean install of my LAMP system, and got to PHP. On ./configure it goes through all the normal processes untill it reaches the -lmysqladmin line, where it kicks out w

[PHP-DB] MySQL Query Help

2006-03-23 Thread Mark Dyer
Hello, I'm unsure how to write the follow query, Please can someone assist. I am writing in short hand the basis of the two queries I would like to combine. The object is to select all the products that have not meet the min sale requirements so I can send myself a reminder email. The first tabl

Re: [PHP-DB] MySQL - Unable to run service

2006-03-15 Thread dpgirago
> I have been using MySQL for quite some time and am now running Server 4.1. I > have been developing custom web-based software for a customer and recently > moved their server to a different machine. I have everything running > smoothly EXCEPT for mySQL. Any time I try to start the service I get

[PHP-DB] MySQL - Unable to run service

2006-03-15 Thread Ralph Brickley
I have been using MySQL for quite some time and am now running Server 4.1. I have been developing custom web-based software for a customer and recently moved their server to a different machine. I have everything running smoothly EXCEPT for mySQL. Any time I try to start the service I get an error:

Re: [PHP-DB] MySQL creating new tables using wrong engine...

2006-03-15 Thread Adrian Bruce
--default-storage-engine option in your options file (my.ini) where engine is the the type of table engine you want to use, in your case MYISAM. If you cant change that then specify the engine type every time you create a table: create table table_name{ . } TYPE=myisam; Regards Ad

[PHP-DB] MySQL creating new tables using wrong engine...

2006-03-15 Thread Mark Benson
I have run into an issue where I keep getting InnoDB tables everytime I create a new table in PHPMyAdmin, and I want MyISAM tables. It's very annoying. Anyone got any suggestions as to what I might have done that made MySQL or PHPMyAdmin do this? -- Mark Benson http://homepage.mac.com/markbe

RE: [PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread Bastien Koert
Never trust DW to do the testing for you. I never user DWs built in server stuff to test...create it and then test it thru the browser like it would actually operate. Bastien From: "Eustace" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: Subject: RE: [PHP-DB]

Re: [PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread chris smith
c:\Inetpub\wwwroot\safdem_web\Admin\Connections\connSAFDEM.php because that's what the server is looking for. > -Original Message- > From: chris smith [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 14, 2006 12:04 PM > To: [EMAIL PROTECTED] > Cc: php-db@lists.ph

RE: [PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread Eustace
04 PM To: [EMAIL PROTECTED] Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Mysql/PHP5 connection error On 3/14/06, Eustace <[EMAIL PROTECTED]> wrote: > Hello, > > I hope somebody can assist. I am using dreamweaver 8, Mysql, PHP5 for > a simple we application. After using the dream

Re: [PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread chris smith
On 3/14/06, Eustace <[EMAIL PROTECTED]> wrote: > Hello, > > I hope somebody can assist. I am using dreamweaver 8, Mysql, PHP5 for a > simple we application. After using the dreamweaver wizard to make a > connection, then created a recordset. Trouble starts when I use > require_once(connections/Conn

[PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread Eustace
Hello, I hope somebody can assist. I am using dreamweaver 8, Mysql, PHP5 for a simple we application. After using the dreamweaver wizard to make a connection, then created a recordset. Trouble starts when I use require_once(connections/ConnSAFDEM) to link to the database connection file. I get th

RE: [PHP-DB] MySQL update statement problem

2006-03-04 Thread Kevin Davies - Bonhurst Consulting
and regards, Kevin -Original Message- From: Jenaro Centeno Gómez [mailto:[EMAIL PROTECTED] Sent: 04 March 2006 17:35 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL update statement problem Maybe I am wrong, biut isn´this the rigth way to do this: UPDATE shop_customer SET eu_vat_numb

Re: [PHP-DB] MySQL update statement problem

2006-03-04 Thread Chris
You need to separate the SET arguments with commas, not ANDs... It's really doing something like this: UPDATE shop_customer SET eu_vat_number = ("SK1234567890" AND vat_amount = 0 AND total_amount = 8.4925) WHERE customer_id = 7 AND hash="dcd5e751" ("SK1234567890" AND vat_amount = 0 AND total_amo

[PHP-DB] MySQL update statement problem

2006-03-04 Thread Kevin Davies - Bonhurst Consulting
Hi, Apologies if this isn't the right place to ask - but I'm banging my head against the wall with this one! I'm trying to update a record in the table (creation script below) using the following SQL statement: UPDATE shop_customer SET eu_vat_number = "SK1234567890" AND vat_amount = 0 AND total_

[PHP-DB] MySQL latin1 to utf8 conversion

2006-02-02 Thread Radovan Radic
(Previous sending failed for some reaseon!) Hello, I suppose i am not the only one who has got that problem about transferring site database to MySQL 4.1x and to utf8 charset. Before it was MySQL 3.23 and latin1. I have read this article "Turning MySQL data in latin1 to utf-8" on http://www.oreil

Re: [PHP-DB] MySQL date casting..

2006-01-17 Thread Bastien Koert
Youcould also try CASTing (http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html) the data Bastien From: <[EMAIL PROTECTED]> To: CC: <[EMAIL PROTECTED]> Subject: Re: [PHP-DB] MySQL date casting.. Date: Tue, 17 Jan 2006 12:51:44 -0500 Ahh! Thank you Philip! That's w

Re: [PHP-DB] MySQL date casting..

2006-01-17 Thread tg-php
Ahh! Thank you Philip! That's what I was looking for! I see what I did wrong now. I was using the date format strings wrong. I was using it like I'd use it for DATE_FORMAT() instead of as an input filter. This is what I was trying to do: select STR_TO_DATE('2003-11-05 06:00 PM', '%Y-%m-%d %H

RE: [PHP-DB] MySQL date casting..

2006-01-17 Thread tg-php
= = Could you not just add: ORDER BY ApptDate, ApptTime To the end of your SQL - this will order the set by date then time. You can also add ASC or DESC for Ascending or Dscending as desired. N.B. the ORDER BY statement must be the last part of you query! -Original Message----- From: [

Re: [PHP-DB] MySQL date casting..

2006-01-17 Thread Philip Hallstrom
Forgive me that this isn't really PHP related, but solely MySQL.. but the MySQL mailing lists drive me nuts and figured someone here would have a quick answer. I'm trying to sort by a date and time field(s) (two separate fields). It's a dumb system but until we do the next revision, it's going

[PHP-DB] MySQL date casting..

2006-01-17 Thread tg-php
Forgive me that this isn't really PHP related, but solely MySQL.. but the MySQL mailing lists drive me nuts and figured someone here would have a quick answer. I'm trying to sort by a date and time field(s) (two separate fields). It's a dumb system but until we do the next revision, it's going

[PHP-DB] Re : [PHP-DB] MySQL Update Quandry

2005-11-28 Thread Neil Smith [MVP, Digital media]
Message-ID: <[EMAIL PROTECTED]> Date: Sun, 27 Nov 2005 12:49:17 -0500 From: Glenn Deschênes <[EMAIL PROTECTED]> To: php-db@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_Part_11492_6161784.1133113757293" Subject: Re: [PHP-DB

Re: [PHP-DB] MySQL Update Quandry

2005-11-27 Thread Glenn Deschênes
uccessful. ".$queryresult." rows were > altered."; > } > echo $msg; > > Hope this helps. > > Rich > > -Original Message- > From: maestro [mailto:[EMAIL PROTECTED] > Sent: Friday, November 25, 2005 1:11 PM > To: php-db@lists.php

RE: [PHP-DB] MySQL Update Quandry

2005-11-26 Thread Rich Hutchins
ginal Message- From: maestro [mailto:[EMAIL PROTECTED] Sent: Friday, November 25, 2005 1:11 PM To: php-db@lists.php.net Subject: [PHP-DB] MySQL Update Quandry Greetings, I am doing an update to a table as such: class DB { function updateMember($email, $password, $postalCode,

[PHP-DB] MySQL Update Quandry

2005-11-25 Thread maestro
Greetings, I am doing an update to a table as such: class DB { function updateMember($email, $password, $postalCode, $language, $id, $word) { ... if (!(@ mysql_query($query, $connection))) { $this->errors = array(mysql_errno(), mysql_error()); $

RE: [PHP-DB] MySQL Query

2005-11-19 Thread Bastien Koert
SELECT c.eventid, e.ID FROM col_links c left outer join calendar_v2 e ON c.eventid = e.ID where e.id is null LIMIT 0, 999; From: "Keith Spiller" <[EMAIL PROTECTED]> To: "[PHP-DB]" Subject: [PHP-DB] MySQL Query Date: Sat, 19 Nov 2005 19:29:25 -0700 Hi, I'm

[PHP-DB] MySQL Query

2005-11-19 Thread Keith Spiller
Hi, I'm tring to run this query to find orphan entries. SELECT c.eventid, e.ID FROM col_links c left outer join calendar_v2 e ON c.eventid = e.ID LIMIT 0, 999; Then I have to scan the list to find entries where e.ID equals NULL. I was wondering if anyone know how to expand this query with a

Re: [PHP-DB] MYSQL IN A PHP LOOP

2005-11-10 Thread Arie Nugraha
Multiple query can only be done in PHP 5 with MySQLI extension. In PHP 4 maybe you can use an array to store the query and execute each query with foreach :

RE: [PHP-DB] MYSQL IN A PHP LOOP

2005-11-09 Thread Bastien Koert
You can't stack queries this way. PHPMyAdmin parses out the queries based on the ';'. You will need to run the query after each one is created. Bastien From: "Malcolm JC Clark" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: Subject: [PHP-DB] MYSQ

[PHP-DB] MYSQL IN A PHP LOOP

2005-11-09 Thread Malcolm JC Clark
I have a php function that creates the following SQL below with this statement in the loop: ~~~ $myQuery .= " UPDATE page SET page_order_id = \"$page_order_id\" WHERE page_i

Re: [PHP-DB] MySQL 5 Stored Procedures

2005-11-03 Thread Mark Jordan
Thanks a lot. Ive just been reading them up on the MySQL website, and they seem really useful, so this really helps. Mark On 03/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It is possible using PHP 5. Simply make a query like this: > > Select name_of_procedure(parameter1,parameter2,..

[PHP-DB] MySQL 5 Stored Procedures

2005-11-03 Thread Mark Jordan
Ive heard that mysql 5 now supports stored procedures. Can you call these from PHP? or is it too early to expect functionality already? Mark -- This message is best viewed with your eyes. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] MySQL to XML used by JavaScript?

2005-10-22 Thread David Tsay
Hi, I'm new to PHP and am wondering how I might be able to use MySQL with JavaScript. I was thinking that I could use PHP to convert a query from a database into a XML file, and then use JavaScript to access the results from the XML file. The only thing is that I'm not sure how fast PHP is on a

RE: [PHP-DB] MySQL Connect using Dreamweaver

2005-10-13 Thread Bastien Koert
t;W Roothman" <[EMAIL PROTECTED]> To: Subject: [PHP-DB] MySQL Connect using Dreamweaver Date: Thu, 13 Oct 2005 07:17:56 +0200 Dear All, I have installed MySQL 5 with PHP 4.3.3. When trying to connect to a database form the 'Database' tab in Dreamweaver, I now get the

RE: [PHP-DB] MySQL Connect using Dreamweaver

2005-10-12 Thread Matthias Willerich
the OLD_PASSWORD problem, believe me, it is. Alternatively look up the error code, although I don't know if that would've helped in this case. -Original Message- From: W Roothman [mailto:[EMAIL PROTECTED] Sent: 13 October 2005 06:18 To: php-db@lists.php.net Subject: [PHP-DB] MyS

[PHP-DB] MySQL Connect using Dreamweaver

2005-10-12 Thread W Roothman
Dear All, I have installed MySQL 5 with PHP 4.3.3. When trying to connect to a database form the 'Database' tab in Dreamweaver, I now get the following error when trying to select a DB: '1251 Client does not support authentication protocol requested by server; consider upgrading MySQL client'

RE: [PHP-DB] MySQL query result with some errors!

2005-10-11 Thread Bastien Koert
The code looks correct so my guess is that you are parsing it inorrectly in actionscript... Bastien From: Juan Stiller <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] MySQL query result with some errors! Date: Tue, 11 Oct 2005 18:14:42 -0300 (ART) Hi, Im trying to

[PHP-DB] MySQL query result with some errors!

2005-10-11 Thread Juan Stiller
Hi, Im trying to get a query result from mysql database to show it on a flash animation, so far i have this code that its supposed to connect to mysql server , make the query and get the results, store them on variables so that flash can read them. Basically i have these main fileds like : lastnam

[PHP-DB] MySQL query result with some errors!

2005-10-11 Thread Juan Stiller
Hi, Im trying to get a query result from mysql database to show it on a flash animation, so far i have this code that its supposed to connect to mysql server , make the query and get the results, store them on variables so that flash can read them. Basically i have these main fileds like : lastnam

[PHP-DB] MySQL query result with some errors!

2005-10-11 Thread Juan Stiller
Hi, Im trying to get a query result from mysql database to show it on a flash animation, so far i have this code that its supposed to connect to mysql server , make the query and get the results, store them on variables so that flash can read them. Basically i have these main fileds like : lastnam

Re: [PHP-DB] MySQL in PHP5 - problem with charset

2005-09-11 Thread Dominik Fi�er
gt; pí¹e v diskusním pøíspìvku news:[EMAIL PROTECTED] > > does your web server, php and db all use the same charset? they all should > match > >>From: "Dominik Fi¹er" <[EMAIL PROTECTED]> >>To: php-db@lists.php.net >>Subject: [PHP-DB] MySQL in PHP5 -

RE: [PHP-DB] MySQL in PHP5 - problem with charset

2005-09-11 Thread Bastien Koert
does your web server, php and db all use the same charset? they all should match From: "Dominik Fi¹er" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] MySQL in PHP5 - problem with charset Date: Sun, 11 Sep 2005 14:35:44 +0200 I have problem with MySQL in PHP 5

[PHP-DB] MySQL in PHP5 - problem with charset

2005-09-11 Thread Dominik Fi�er
I have problem with MySQL in PHP 5.0.4 (WIN XP). I use charset cp1250 (win-1250, Czech) and PHP5 show results from db in incorect charset. When i use PHP 4, there is no problem! Configuration MySQL server is in both case the same. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe

[PHP-DB] MySQL in PHP5 - problem with charset

2005-09-11 Thread Dominik Fi�er
I have problem with MySQL in PHP 5.0.4 (WIN XP). I use charset cp1250 (win-1250, Czech) and PHP5 show results from db in incorect charset. When i use PHP 4, there is no problem! Configuration MySQL server is in both case the same. -- PHP Database Mailing List (http://www.php.net/) To unsubsc

Re: [PHP-DB] mysql not valid resource. .

2005-08-09 Thread Martin Norland
t: Tuesday, August 09, 2005 9:44 AM To: php-db@lists.php.net Subject: [PHP-DB] mysql not valid resource Hi all, I have a problem with mysql: this code produce a not valid mysq resource. $sql="select distinct des_riga, count ( des_riga ) as freq from k_riga where id_tabella=" . $id_tab

RE: [PHP-DB] mysql not valid resource

2005-08-09 Thread Hutchins, Richard
Sent: Tuesday, August 09, 2005 9:44 AM To: php-db@lists.php.net Subject: [PHP-DB] mysql not valid resource Hi all, I have a problem with mysql: this code produce a not valid mysq resource. $sql="select distinct des_riga, count ( des_riga ) as freq from k_riga where id_tabella=" . $id_ta

RE: [PHP-DB] mysql not valid resource

2005-08-09 Thread Bastien Koert
try adding some debug code to the statement execution $query=mysql_query ($sql, $connessione) or die ("error is " .mysql_error()); to get an error message that can help debug the query bastien From: Marco Strullato <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [P

[PHP-DB] mysql not valid resource

2005-08-09 Thread Marco Strullato
Hi all, I have a problem with mysql: this code produce a not valid mysq resource. $sql="select distinct des_riga, count ( des_riga ) as freq from k_riga where id_tabella=" . $id_tabella . " and id_colonna=" . $id_colonna . " group by des_riga order by des_riga"; $query=mysql_query ($sql, $connessi

RE: [PHP-DB] MySQL 4.1 and PHP4

2005-07-10 Thread Bastien Koert
4 does not come with the mysqli extension. You would need to download it (seprately or as part of the php5 module) and then move the extension aapropriate folder... Bastien From: Andre Matos <[EMAIL PROTECTED]> To: "'PHP-mailist (PHP-mailist)'" Subject: [PHP-DB] My

[PHP-DB] MySQL 4.1 and PHP4

2005-07-10 Thread Andre Matos
Hi, It is possible to use mysqli_connect and the others mysqli functions in PHP4? I have downloaded the PHP4 and compiled using these parameters on my MacOSX: ./configure --prefix=/usr/local/php4compiled --with-apxs=/usr/sbin/apxs --enable-mbstring --with-xml --with-mysql=/usr/local/mysql --with-

[PHP-DB] MySQL 4.1 as Backend

2005-07-05 Thread dpgirago
Anyone using MySQL 4.1 as a backend to their PHP apps? I'm particularly interested in the cluster software that the docs say are part of 4.1. I have some apps that would benefit from a high uptime db backend but I'm a bit concerned about the 'not enterprise-ready' disclaimer on the mysql websit

Re: [PHP-DB] mysql load data form input file

2005-07-02 Thread B.A.T. Svensson
On Thu, June 30, 2005 9:05 pm, blackwater dev said: > Does anyone know if it is possible to load data into multiple > tables using one file when you use load data local infile? That is not possible. > I need to load several tables but don't want to have tons of files. You may need to change your

[PHP-DB] mysql load data form input file

2005-06-30 Thread blackwater dev
Does anyone know if it is possible to load data into multiple tables using one file when you use load data local infile? I need to load several tables but don't want to have tons of files. Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

[PHP-DB] MySQL Functions Installation

2005-06-26 Thread John Jairo Vega Angulo
Ok here's a dummy question from yet another newbie: Reading the instructions for enabling the MySQL Functions, I understood until i get to this: "For compiling, simply use the --with-mysql[=DIR] configuration option where the optional [DIR] points to the MySQL installation directory. " i have

Re: [PHP-DB] MySQL/PHP how to put the results of one query in another query

2005-06-26 Thread Ross Honniball
This is what I use when needing to do this: 1. Put all the values you want to search for in an array $vals (loop around the first result) 2. $query = " select count(Nome) from Aeromodelistas where year(AnoQuota)=2005 and Sexo='Masculino' and Distrito IN ".sqlIn($vals) ; function sq

[PHP-DB] MySQL/PHP how to put the results of one query in another query

2005-06-26 Thread Pedro Quaresma de Almeida
Hi I have two MySQL databases, on for aeromodelistas (aeromodelling) and another for Códigos Postais (Postal Codes). I whant to do the following query SELECT CódigoPostal FROM Aeromodelistas WHERE CódigoPostal IN (SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO WHERE co

Fwd: [PHP-DB] mysql check boxes

2005-06-24 Thread Globalvoice101
riginal Message - From: <[EMAIL PROTECTED]> To: Sent: Friday, June 24, 2005 5:25 AM Subject: [PHP-DB] mysql check boxes Dear Friends, I have mysql database and php script. Script pulls all the data with their serial number in html form, from database however, I want each field pulled t

Re: [PHP-DB] mysql check boxes

2005-06-24 Thread Mark Cain
but this should get you to the place where you can work it out. Mark Cain - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Friday, June 24, 2005 5:25 AM Subject: [PHP-DB] mysql check boxes Dear Friends, I have mysql database and php script. Script pulls all the data with th

[PHP-DB] mysql check boxes

2005-06-24 Thread Globalvoice101
Dear Friends, I have mysql database and php script. Script pulls all the data with their serial number in html form, from database however, I want each field pulled to be preceeded by a check box. I created field in table and entered array for check boxes in php script, still check boxes aren'

Re: [PHP-DB] mySQL UPDATE

2005-06-09 Thread Philip Hallstrom
On Thu, 9 Jun 2005, Ron Piggott wrote: I created a PHP based mailing list that sends out a Bible verse and a quotation each day. Today's verses were: [snip] Let me show you some code: It selects a Bible verse: SELECT * FROM bible ORDER BY RAND() LIMIT 1 On a side note, this is going to

[PHP-DB] mySQL UPDATE

2005-06-09 Thread Ron Piggott
I created a PHP based mailing list that sends out a Bible verse and a quotation each day. Today's verses were: Bible verse of the day: Matthew 17:19-21 Then the disciples came to Jesus privately and said, "Why could we not cast it out?" And He said to them, "Because of the littleness of your fa

Re: [PHP-DB] mysql INNER JOIN

2005-05-29 Thread Mike Bellerby
have a look at http://www.webmasterworld.com/forum88/3653.htm hope this helps! Mike ioannes wrote: I usually use INNER JOIN to link tables together in a straight line, like a branch. Can I use it to link tables like twigs stemming off the branch. If so, do I use: SELECT TABLE1.FIELD, TA

[PHP-DB] mysql INNER JOIN

2005-05-28 Thread ioannes
I usually use INNER JOIN to link tables together in a straight line, like a branch. Can I use it to link tables like twigs stemming off the branch. If so, do I use: SELECT TABLE1.FIELD, TABLE2.FIELD, TABLE3.FIELD FROM ( TABLE1 INNER JOIN TABLE2 ON TABLE1.FIELD =TABLE2.FIELD ) INNER JOIN TABLE

Re: [PHP-DB] Mysql: LOCK TABLES

2005-05-01 Thread Chris
Miles Thompson wrote: At 09:01 PM 5/1/2005, Chris wrote: Hi, I've got question on using LOCK TABLES with MySQL and PHP. I don't have a great understanding of LOCK TABLES, but I'll lay out my situation: I've got a table and a PHP function to rebuild several columns in this table. I need to read

Re: [PHP-DB] Mysql: LOCK TABLES

2005-05-01 Thread Miles Thompson
At 09:01 PM 5/1/2005, Chris wrote: Hi, I've got question on using LOCK TABLES with MySQL and PHP. I don't have a great understanding of LOCK TABLES, but I'll lay out my situation: I've got a table and a PHP function to rebuild several columns in this table. I need to read these columns from the

[PHP-DB] Mysql: LOCK TABLES

2005-05-01 Thread Chris
Hi, I've got question on using LOCK TABLES with MySQL and PHP. I don't have a great understanding of LOCK TABLES, but I'll lay out my situation: I've got a table and a PHP function to rebuild several columns in this table. I need to read these columns from the database (all of them) and recalc

[PHP-DB] MySQL Newsgroup?

2005-04-26 Thread Nhan
I seek for a MySQL newsgroup, can anybody help me? Martin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] MySQL query + PHP : Warning: implode() [function.implode]: Bad arguments : What's wrong here?

2005-04-21 Thread jinxed
I have 2 tables employees & transactions. 'employees' carry info about the employees and transactions carry there payslip info for each period. I am trying to display a list of employees that don't have transactions in the current ($pp_id) period, thus doing an array of the $emp_ids, having trans

Re: [PHP-DB]MYSQL

2005-04-21 Thread Petar Nedyalkov
On Thursday 21 April 2005 13:41, Ong Teng Siong wrote: > I am using mysql 4.1 and php 5.0 in my WINDOWS XP. I > am trying to use it. But, this error msg eccurs. > > Fatal error: Call to undefined function > mysqli_connect() in c:\Inetpub\wwwroot\mysql_up.php Your PHP installation does not support

[PHP-DB]MYSQL

2005-04-21 Thread Ong Teng Siong
I am using mysql 4.1 and php 5.0 in my WINDOWS XP. I am trying to use it. But, this error msg eccurs. Fatal error: Call to undefined function mysqli_connect() in c:\Inetpub\wwwroot\mysql_up.php Anyone can help me? Thank you. __ Do You Yahoo!? Tire

Re: [PHP-DB] MySQL JOIN query : Seeking solution - Please Help

2005-04-20 Thread graeme
Get those with transaction into a php array Get those without transaction into a php array Then use array_diff() (or one of its variants) graeme. jinxed wrote: I am still new to this, but I turned the manual upside down, or at least I tried. I am designing a payroll application by which payslips

Re: [PHP-DB] MySQL JOIN query : Seeking solution - Please Help

2005-04-20 Thread Brent Baisley
When checking for unmatched records, you use a left join as you are doing. This assures all records are retained from the left side table (i.e. employees), regardless if there is a matching record or not. Obviously if you have a filter on the left side table it will narrow down the result.

[PHP-DB] MySQL 5 Beta

2005-04-20 Thread Dusty Bin
Hi, I've been trying to get MySQL 5 installed with php-5.0.4(windows). I'm getting several messages about entry points not being found in dlls etc etc. Am I being over optimistic to expect this configuration to work? Indeed has anyone got it working? If it should work, I'll press on and

[PHP-DB] MySQL JOIN query : Seeking solution - Please Help

2005-04-20 Thread jinxed
I am still new to this, but I turned the manual upside down, or at least I tried. I am designing a payroll application by which payslips can be processed for each employee for each period. The problem lays where I would like to display a list of employees that don't have transactions (payslips

RE: [PHP-DB] mysql query plan

2005-04-13 Thread Bastien Koert
table join into 3 queries and application based arrays, I reduced the run time to about 10 seconds with 50x the output. Bastien From: Eddie Peloke <[EMAIL PROTECTED]> Reply-To: Eddie Peloke <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] mysql query plan Date: Wed, 13 Ap

[PHP-DB] mysql query plan

2005-04-13 Thread Eddie Peloke
Hello, We are working to optimize a few queries. When we run the query with Explain, it appears that the query optimizer is not using one of the tables index and doing a full table scan while it appears to use other tables' indices properly. We then remove the table with the full scan, run again

[PHP-DB] MySQL SQL CACHE

2005-04-13 Thread Joe Harman
Hello, First time on this list, I generally use the general PHP list... but I was curious if alot of people are using SQL CACHE with MySQL and PHP and does it seem to increase the performance... or lighten the load on mysql for you? Thanks Joe

Re: [PHP-DB] MySQL connects to localhost via socket reguardless

2005-04-10 Thread Josip Dzolonga
Jeffrey D. Means wrote: I am trying to connect to a DB on a difrent server but mysql keeps connecting to the local server via the socket. What is going on? -- code snippet-- $connection = mysql_connect("mysql.meanspc.com:3306", "Removed", "Removed"); Well try some debugging : $connection

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