[PHP] RE: mysql query returning slowly

2010-04-07 Thread David Murphy
Nathan, The profiling I included proved that was not the case. Mysql run the query and return the single column single row result in under 1 second but PHP's mysql->query waited much longer than that to return. If it was a big result set I could see some slow down in parsing the results into

[PHP] Re: mysql query returning slowly

2010-04-06 Thread Nathan Rixham
David Murphy wrote: > > This is from our application > I enabled profile in mysql to determine why an update took 20seconds. As > you can see MySQL reported no where near that amount of duration took > place. > Is there any way I can dig into php and determine why mysql client libs are > so

[PHP] Re: mysql query/$post problem

2006-03-27 Thread Barry
Mark wrote: I havnt even tried this query but i know its wrong can anyone help! How do you know it's wrong ? O_o *** $query = "INSERT INTO users (AVATARS) VALUES ('$avname') WHERE id = $user_id"; This works only if the $avname is a STRING! mysql_query($

RE: [PHP] Re: MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Michael Egan
uot;.mysql_error().""; } if(!$query = @mysql_query("SELECT * FROM RegisteredMembers")) { echo "Couldn't execute query: ".mysql_error().""; } else { while($result = mysql_fetch_array($query)) { echo $result['UserID']; } } HTH, Mich

[PHP] Re: MySQL QUERY Results Not Appearing

2004-07-02 Thread Harlequin
Craig. Thanks for the response and sorry I've been delayed in getting back to you. I put a new page together and dropped all the peripheral code and this is what I ended up with: active members should appear here"; $query = mysql_query("SELECT * FROM RegisteredMembers") or die("could not execute

[PHP] Re: MySQL QUERY Results Not Appearing

2004-06-30 Thread Craig Donnelly
$result is an array that has to be fetched...try this echo "active members should appear here"; $query = mysql_query("SELECT * FROM RegisteredMembers") or die("could not execute query"); while($result = mysql_fetch_array($query)){ echo $result['YOUR_DB_FIELDNAME']; } change YOUR_DB_FIELDNAME

[PHP] Re: Mysql query and PHP loops

2003-07-31 Thread sven
did you also play with group by? what does this return? select * from `yourTable` group by `val1` ciao SVEN Petre Agenbag wrote: > Hi List > > I've been trying to do something with one MySQL query, but I don't > think it is possible, so, I would need to probably do multiple > queries, and possib

RE: [PHP] Re: MySQL query problems

2003-07-16 Thread Beauford.2005
EMAIL PROTECTED] Sent: July 16, 2003 5:31 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: MySQL query problems But what's your prob ? When you say the second one seems to never be executed ... Does the line: $row = mysql_fetch_array($result2); launches a Php Error ? And pay attention, because yo

[PHP] Re: MySQL query problems

2003-07-16 Thread Nomadeous
But what's your prob ? When you say the second one seems to never be executed ... Does the line: $row = mysql_fetch_array($result2); launches a Php Error ? And pay attention, because you're using mysql_fetch_array and mysql_fetch_row, be sure that you are not treating the result in the same way ;-

[PHP] Re: MySQL Query

2003-03-05 Thread David Eisenhart
If I understand your requirement correctly I would say that you are looking in the wrong place to protect particular table fields from the user; the user gets access to the underlying database only through your 'application' pages (ie. your php pages) - it is your coding of these pages that determi

RE: [PHP] Re: mysql query

2002-09-11 Thread David Buerer
") or die (mysql_error()); $row=mysql_fetch_array($result); $euro =$row[0]; -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 7:50 AM To: David Buerer Subject: Re: [PHP] Re: mysql query Maybe I wasn't clear. The value returned should

[PHP] Re: mysql query

2002-09-11 Thread bill
Ooops, for clarity, I shouldn't have named the result of the function "row" but "euro". It should be: $euro=mysql_one_element("select euro from brandstofprijzen where id=2", "euro"); Bill wrote: > function mysql_one_element($query, $element) { > // quickly returns just one element from a que

RE: [PHP] Re: mysql query

2002-09-11 Thread David Buerer
Look into the LIMIT command, it will limit the number of rows in the result set to the number you specify -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 7:10 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mysql query function mysql_one_element

[PHP] Re: mysql query

2002-09-11 Thread bill
function mysql_one_element($query, $element) { // quickly returns just one element from a query $one=mysql_query($query); // add error checking here if you wish $r=mysql_fetch_array($one); $thisvalue=$r[$element]; return($thisvalue); } $row=mysql_one_element("select euro from brandsto

[PHP] Re: MySQL Query

2002-03-04 Thread Kenneth Chau
Jason Whitaker wrote: > OK, I need to know is there a place where i can find out how to pull > information(TEXT) from a MySQL DB table and print where i place a variable > in a php page? I have NO idea what your question is... did you just want to echo something from your MySQL db table inside

[PHP] Re: MySQL query question

2002-01-24 Thread Mike Eheler
Let's say you have this table, pseudo-coded: TABLE table tableid int auto_increment, value text ; You could run this query on it: insert into table values ('','value'); And the id will be auto generated. Same would apply with: inert into table (value) values ('value'); Mike Phil Schw

[PHP] Re: MySQL query

2001-10-18 Thread Curt A. Gilman
Try using a LEFT JOIN against the second table, returning only records with no match. Something like: SELECT DISTINCT A.username FROM user A LEFT JOIN task_assignment B ON (A.username = B.username) WHERE B.username IS NULL; See JOIN syntax in MySQL documentation for more information: http:

RE: [PHP] Re: MySQL query error

2001-09-17 Thread Niklas Lampén
:) It just started to work. World's a strange place. Maybe someone was doing something to the server/php/mysql, dunno. Niklas -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: 17. syyskuuta 2001 15:03 To: [EMAIL PROTECTED] Subject: [PHP] Re: MySQL query

[PHP] Re: MySQL query error

2001-09-17 Thread _lallous
> mysql_quory($Query); typos i can't also see more errors... "Niklas lampén" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Code: > $Query = "UPDATE feRegUsers SET Constructor='2001-09-17', > Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'"

Re: [PHP] Re: mysql query . need help!!!!!

2001-09-04 Thread Jon Farmer
>You cant use a select statement withoug using a table name. >check out this >$query = "insert into classification(customername) (select customername from username >where username='$username')"; Incorrect in mySQL you can do mysql> select 3+5; returns 8 plus a whole lot of other functions that

[PHP] Re: mysql query . need help!!!!!

2001-09-04 Thread sagar
You cant use a select statement withoug using a table name. check out this $query = "insert into classification(customername) (select customername from username where username='$username')"; i cant answer ur second question, since i dont the structure of your table /sagar original message

[PHP] Re: mysql query . need help!!!!!

2001-09-04 Thread _lallous
Nope, MySql doesn't allow select within select... try making two seperate queries... "Lizlynch" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i have two tables here, i want to insert the customername from the Username table and insert it into the Classification

[PHP] Re: MySQL query length

2001-08-27 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Niklas lampén) wrote: > Can it cause any problems if mySQL query is very long? I have to compare > many words to many fields in my DB and I've done it like > "Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field LIKE > '%searchwor

[PHP] Re: mySQL Query - comparing multiple values with one field

2001-08-22 Thread James Holloway
Hi Niklas, You can use || or OR. Secondly, huge list of values you say? Can this list be exploded by a common denominator, like a space or comma? If so, consider this: $list = // Huge list of words (array), separated by a comma. $words = explode(",", $list); $query = "SELECT * FROM table WHER