Re: [PHP] php/mysql - getting ID of query

2007-08-21 Thread mike
mysql_insert_id() mysqli_insert_id() http://us.php.net/mysql is your friend :) http://us.php.net/mysqli too! On 8/21/07, John Pillion <[EMAIL PROTECTED]> wrote: > This is as much a mysql question as it is php. > > > > What is the most reliable way to retrieve an auto_increment key/id for a > qu

[PHP] php/mysql - getting ID of query

2007-08-21 Thread John Pillion
This is as much a mysql question as it is php. What is the most reliable way to retrieve an auto_increment key/id for a query you just inserted? In other words, I compile all my data, insert it into a new row, and now I want to retrieve the ID it created for it in the ID/key field. Without

Re: [PHP] About PHP/MYSQL Pagination

2007-08-07 Thread Richard Lynch
On Thu, August 2, 2007 8:12 pm, Kelvin Park wrote: > I just couldn't find it anywhere, google or yahoo. I know how to make > first, previous, last, and next links for php/mysql pagination. How do > you list page numbers in the middle, between previous and next? (ex. > << >

Re: [PHP] About PHP/MYSQL Pagination

2007-08-04 Thread Richard Heyes
I just couldn't find it anywhere, google or yahoo. I know how to make first, previous, last, and next links for php/mysql pagination. How do you list page numbers in the middle, between previous and next? (ex. << first previous | 1 2 3 4 5 | next last >> ) I know how to displ

RE: [PHP] About PHP/MYSQL Pagination

2007-08-04 Thread Sanjeev N
nchanworld.com/ http://webdirectory.sanchanworld.com -Original Message- From: Kelvin Park [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 6:43 AM To: php-general@lists.php.net Subject: [PHP] About PHP/MYSQL Pagination I just couldn't find it anywhere, google or yahoo. I know how to ma

[PHP] Re: About PHP/MYSQL Pagination

2007-08-02 Thread Kelvin Park
Kelvin Park wrote: I just couldn't find it anywhere, google or yahoo. I know how to make first, previous, last, and next links for php/mysql pagination. How do you list page numbers in the middle, between previous and next? (ex. << first previous | 1 2 3 4 5 | next last >>

[PHP] About PHP/MYSQL Pagination

2007-08-02 Thread Kelvin Park
I just couldn't find it anywhere, google or yahoo. I know how to make first, previous, last, and next links for php/mysql pagination. How do you list page numbers in the middle, between previous and next? (ex. << first previous | 1 2 3 4 5 | next last >> ) I know how to displ

Re: [PHP] PHP/MYSQL/XML Conversion

2007-07-23 Thread Chris
Kelvin Park wrote: I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to produce XML file, or convert every table in to XML file and use those XML files to relate data? I'd make the database do a

Re: [PHP] PHP/MYSQL/XML Conversion

2007-07-23 Thread Nathan Nobbe
certainly it is better to use the database, as it is designed for such a purpose. -nathan On 7/23/07, Kelvin Park <[EMAIL PROTECTED]> wrote: I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to p

[PHP] PHP/MYSQL/XML Conversion

2007-07-23 Thread Kelvin Park
I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to produce XML file, or convert every table in to XML file and use those XML files to relate data? -- PHP General Mailing List (http://www.php.ne

[PHP] mysql question

2007-07-16 Thread Man-wai Chang
I tried to post to mysql.general, but the message never appeared. So I am trying my luck here. How could I build an index for a table created using the "CREATE TEMPORARY TABLE ... SELECT ... FROM ..." syntax, using an account without the privilege to use ALTER TABLE? -- .~. Might. Courage.

Re: [PHP] Calendar booking form in PHP/MySQL

2007-07-08 Thread Zareef Ahmed
other :) Zareef Ahmed On 7/3/07, Timothy Murphy <[EMAIL PROTECTED]> wrote: I'm looking for a PHP/MySQL "calendar booking form", which I am sure must have been done a million times. This will show a calendar on the web mirroring a MySQL table. Each entry in the MySQL table will sho

[PHP] Calendar booking form in PHP/MySQL

2007-07-03 Thread Timothy Murphy
I'm looking for a PHP/MySQL "calendar booking form", which I am sure must have been done a million times. This will show a calendar on the web mirroring a MySQL table. Each entry in the MySQL table will show two dates, Start and End. The dates between these should be shown in red

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 23:41 -0400, Guillaume Theoret wrote: > On 6/13/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: > > > > > > > > I actually use this little optimizing trick as an interview question for > > new hires. You'd be amazed at how many people don't think of this, as > > obvious as it s

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
On 6/13/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: I'll throw in my suggestion here as to how I implement this. Generally I evaluate how big are the tables and what do I intend to do with them. Sorting is usually a "problem". Using the PHP multi_sort seems cumbersome and never seems to be as

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, June 13, 2007 12:31 pm, Guillaume Theoret wrote: > Thanks for the response. > > On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> > Hi everyone, >> > >> > Can anyone

RE: [PHP] php / mysql performance resources

2007-06-13 Thread Daevid Vincent
I'll throw in my suggestion here as to how I implement this. Generally I evaluate how big are the tables and what do I intend to do with them. Sorting is usually a "problem". Using the PHP multi_sort seems cumbersome and never seems to be as simple as letting the DB do it. I too use LEFT JOINs

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:31 pm, Guillaume Theoret wrote: > Thanks for the response. > > On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> > Hi everyone, >> > >> > Can anyone recommend any good books/resources for php and mysql >

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 12:39 -0500, Richard Lynch wrote: > On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: > > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > >> Hi everyone, > >> > >> Can anyone recommend any good books/resources for php and mysql > >> performance management? I

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:31 -0400, Guillaume Theoret wrote: > Thanks for the response. > > On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > > > Hi everyone, > > > > > > Can anyone recommend any good books/resources for php and

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> Hi everyone, >> >> Can anyone recommend any good books/resources for php and mysql >> performance management? I'm more interested in the software >> development side (as opposed t

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
Thanks for the response. On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > Hi everyone, > > Can anyone recommend any good books/resources for php and mysql > performance management? I'm more interested in the software > developme

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > Hi everyone, > > Can anyone recommend any good books/resources for php and mysql > performance management? I'm more interested in the software > development side (as opposed to server configuration) of things. I'm > looking for anything

[PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
Hi everyone, Can anyone recommend any good books/resources for php and mysql performance management? I'm more interested in the software development side (as opposed to server configuration) of things. I'm looking for anything that would be good to know when working on websites that get millions

Re: [PHP] MySQL UTF-8 vs Extended ASCII

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 7:34 pm, Larry Garfield wrote: > You may find this useful: > http://us.php.net/manual/en/function.mb-convert-encoding.php > > It is frequently reasonably good at guessing the incoming character > set, at > least the one time we used it at work. Try running all pages/strings >

Re: [PHP] MySQL UTF-8 vs Extended ASCII

2007-06-11 Thread Larry Garfield
The underlying problem is that there is no one "Extended ASCII". There's a dozen or so different schemes for the 129-255 range, all of them incompatible. That's why Unicode now exists. :-) I've been tracking this issue myself on my blog, which may be of background use for you (especially some

[PHP] MySQL UTF-8 vs Extended ASCII

2007-06-11 Thread Richard Lynch
This may actually be a MySQL question... Or not. I'm scraping about 55,000 pages from a website into a MySQL database. Some of these pages have "extended ASCII" values in their content, or, in some cases, just plain junk ASCII values, as far as I can tell. For example, decimal 163 is sometimes

Re: [PHP] MySQL Connection in Session ?

2007-06-11 Thread Stut
PHP Mailing List wrote: Can I maintain just one mysql connection resource to all my pages per user session. As far as I knows create connection is more expensive than executing queries ? No, you can't store resources (of which mysql connections are one example) in sessions. Any reference h

Re: [PHP] MySQL Connection in Session ?

2007-06-11 Thread Satyam
go as fast as you can to give the next in line a chance to reuse it from the pool. Satyam - Original Message - From: "PHP Mailing List" <[EMAIL PROTECTED]> To: Sent: Monday, June 11, 2007 6:53 PM Subject: [PHP] MySQL Connection in Session ? Can I maintain just

[PHP] MySQL Connection in Session ?

2007-06-11 Thread PHP Mailing List
Can I maintain just one mysql connection resource to all my pages per user session. As far as I knows create connection is more expensive than executing queries ? Any reference how to make efficient for connection resources ? Thanks, Dino -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Christian Haensel
* Have a great coding-day :o)) Chris - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, May 22, 2007 2:42 AM Subject: Re: [PHP] PHP & MySQL Problem On Mon, May 21, 2007 2

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Richard Lynch
On Mon, May 21, 2007 2:26 am, Christian Haensel wrote: > Good morning friends, > > I have a script that collects data from a form and puts together a > mysql > query to search a database. > Now, everything worked fine until I added a few new form fields... now > the > $_POST['var'] don't reach the

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Christian Haensel
y, May 21, 2007 10:16 AM Subject: Re: [PHP] PHP & MySQL Problem 2007. 05. 21, hétfő keltezéssel 10.04-kor Christian Haensel ezt írta: I thought so, too. But the part where it receives the data is this: $s_marke = $_POST['marke']; $s_modell = $_POST['modell']; $

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Zoltán Németh
Howcome people don't get that programming > sometimes really IS leaning back and closing your eyes *gr* :oP > > Thanks for trying to help me :o) > > Chris > > - Original Message - > From: "Zoltán Németh" <[EMAIL PROTECTED]>

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Christian Haensel
at I've had before... but there should be changes *g* actually there seems to be no problem with your query (besides that you should check posted values first in order to avoid SQL injection) you said in your first letter that "$_POST['var'] don't reach the script&q

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Zoltán Németh
elevant part is not the query but rather the form itself... greets Zoltán Németh > > I hope anybody can find some sense in what I'm writing here... hardly makes > sense to me :oP > > Cheers! > > > > > > > > - Original Message -

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Christian Haensel
n there. So no changes to what I've had before... but there should be changes *g* I hope anybody can find some sense in what I'm writing here... hardly makes sense to me :oP Cheers! - Original Message - From: "Zoltán Németh" <[EMAIL PROTECTED]> To: &q

Re: [PHP] PHP & MySQL Problem

2007-05-21 Thread Zoltán Németh
2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: > Good morning friends, > > I have a script that collects data from a form and puts together a mysql > query to search a database. > Now, everything worked fine until I added a few new form fields... now the > $_POST['var'] do

[PHP] PHP & MySQL Problem

2007-05-21 Thread Christian Haensel
Good morning friends, I have a script that collects data from a form and puts together a mysql query to search a database. Now, everything worked fine until I added a few new form fields... now the $_POST['var'] don't reach the script... I have about 20 to 25 form fields which are all taken i

Re: [PHP] PHP & MySQL

2007-05-12 Thread Richard Lynch
ning and trying. Do the SQL injection defense FIRST. Do the login screen SECOND. Then write the delete code. Writing it backwards from that is just too risky. Unless your dev boxes are all behind a firewall and inaccessible to the public in the first place... > The SQL syntax is easy enough for

Re: [PHP] PHP & MySQL

2007-05-10 Thread Miguel J. Jiménez
Jason Pruim escribió: Hi Everyone, I know this isn't strictly a PHP question, and I apologize in advance for that. I'm trying to setup a website for some of my customers that would allow them to update a database on their schedule, making it easier for us to have the most up to date info, and

[PHP] PHP & MySQL

2007-05-10 Thread Jason Pruim
Hi Everyone, I know this isn't strictly a PHP question, and I apologize in advance for that. I'm trying to setup a website for some of my customers that would allow them to update a database on their schedule, making it easier for us to have the most up to date info, and taking some of th

Re: [PHP] MySQL change-tracking

2007-05-03 Thread Chris
Richard Lynch wrote: On Wed, May 2, 2007 4:32 pm, Brad Fuller wrote: Richard Lynch wrote: I have this simple database and I'm going to have a handful of people editing it... I'd like to track each and every edit with username, and, ideally, provide myself an easy "Undo" if I decide [bleep] is

RE: [PHP] MySQL change-tracking

2007-05-02 Thread Richard Lynch
On Wed, May 2, 2007 4:32 pm, Brad Fuller wrote: > Richard Lynch wrote: >> I have this simple database and I'm going to have a handful >> of people editing it... >> >> I'd like to track each and every edit with username, and, >> ideally, provide myself an easy "Undo" if I decide [bleep] is >> an i

RE: [PHP] MySQL change-tracking

2007-05-02 Thread Brad Fuller
Richard Lynch wrote: > I have this simple database and I'm going to have a handful > of people editing it... > > I'd like to track each and every edit with username, and, > ideally, provide myself an easy "Undo" if I decide [bleep] is > an idiot and shouldn't have done that. > > Now, I'm not real

Re: [PHP] PHP & MySQL -> Field Title

2007-05-02 Thread Richard Lynch
On Mon, April 30, 2007 12:47 am, Christian Haensel wrote: > Good Morning guys and girls > > As I am rather lazy, I don't wanna do a data readout on my MySQL table > in > the following way with mysql_fetch_assoc() > > $data_item1=$data['xitem1']; > $data_item2=$data['yitem2]; > ...

[PHP] MySQL change-tracking

2007-05-02 Thread Richard Lynch
I have this simple database and I'm going to have a handful of people editing it... I'd like to track each and every edit with username, and, ideally, provide myself an easy "Undo" if I decide [bleep] is an idiot and shouldn't have done that. Now, I'm not real concerned about the relational forei

Re: [PHP] PHP & MySQL -> Field Title

2007-04-30 Thread Christian Haensel
r Block" <[EMAIL PROTECTED]> To: Cc: "Christian Haensel" <[EMAIL PROTECTED]> Sent: Monday, April 30, 2007 1:11 PM Subject: Re: [PHP] PHP & MySQL -> Field Title Am Montag, 30. April 2007 07:47 schrieb Christian Haensel: but now I have the problem with the fie

Re: [PHP] PHP & MySQL -> Field Title

2007-04-30 Thread Oliver Block
Am Montag, 30. April 2007 07:47 schrieb Christian Haensel: > but now I have the problem with the field names and all... can someone > point me into the right direction? php-db at lists.php.net If you need to use an assoc array, use the following SQL S

Re: [PHP] PHP & MySQL -> Field Title

2007-04-30 Thread Auto-Deppe, C. Haensel
nevermind, I made it :o) RTFM sometimes works even for me :O)) Have a great day :o) Chris - Original Message - From: "Christian Haensel" <[EMAIL PROTECTED]> To: Sent: Monday, April 30, 2007 7:47 AM Subject: [PHP] PHP & MySQL -> Field Title Good Morning

[PHP] PHP & MySQL -> Field Title

2007-04-29 Thread Christian Haensel
Good Morning guys and girls As I am rather lazy, I don't wanna do a data readout on my MySQL table in the following way with mysql_fetch_assoc() $data_item1=$data['xitem1']; $data_item2=$data['yitem2]; I am trying to do the following: I have the correct number of fields

Re: [PHP] mysql if empty

2007-04-11 Thread Jim Lucas
tedd wrote: At 5:53 PM -0700 4/10/07, Jim Lucas wrote: Anyways, here is the expanded version hopefully to your liking. # Your request failed. Make up your own custom way of displaying the error. } else { if ( mysql_num_rows($results) > 0 ) { while ( $row = mysql_fetch_assoc(

Re: [PHP] mysql if empty

2007-04-11 Thread tedd
At 5:53 PM -0700 4/10/07, Jim Lucas wrote: Anyways, here is the expanded version hopefully to your liking. # Your request failed. Make up your own custom way of displaying the error. } else { if ( mysql_num_rows($results) > 0 ) { while ( $row = mysql_fetch_assoc($res

Re: [PHP] mysql if empty

2007-04-10 Thread tg-php
Top-posting is sublime. Embrace it. Why scroll through 10 pages of emails you've already read when you can get to the meat of it all in the first few lines of an email? :) Plus trying to quickly separate all the previous replies from the latest one when some emailers indent, indent with lead

Re: [PHP] mysql if empty

2007-04-10 Thread Robert Cummings
On Tue, 2007-04-10 at 20:48 -0500, Richard Lynch wrote: > No. > > Despite the fact that I replied to your message as it was the "last" > one, and that caused threaded mail readers to place my post directly > under yours as a "reply", my comment was not specifically directed at > your post. > > I

Re: [PHP] mysql if empty

2007-04-10 Thread Richard Lynch
No. Despite the fact that I replied to your message as it was the "last" one, and that caused threaded mail readers to place my post directly under yours as a "reply", my comment was not specifically directed at your post. I had deleted the "way wrong" posts by the time I realized I wanted to say

Re: [PHP] mysql if empty

2007-04-10 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Turn on MAGIC QUOTES and REGISTER GLOBALS Once you've done that, install Postgres. Run your MySQL command again, Postgres has much better error reporting and will assist in debugging the situation. You might consider replacing your javascript functions with PHP ones

Re: [PHP] mysql if empty

2007-04-10 Thread Jim Lucas
Richard Lynch wrote: I am amazed by the sheer number of just plain WRONG answers to this one... Were they all from April 1 or something?... so, are you saying that my answer was wrong, or just making a statement. If my answer was wrong, it was because it was too simple, which is what I was tr

Re: [PHP] mysql if empty

2007-04-10 Thread tg-php
Turn on MAGIC QUOTES and REGISTER GLOBALS Once you've done that, install Postgres. Run your MySQL command again, Postgres has much better error reporting and will assist in debugging the situation. You might consider replacing your javascript functions with PHP ones since JS can sometimes int

Re: [PHP] mysql if empty

2007-04-10 Thread Lori Lay
Richard Lynch wrote: I am amazed by the sheer number of just plain WRONG answers to this one... Were they all from April 1 or something?... Yes it's unfortunate. I think part of the problem was that several people, including myself, weren't entirely clear on what he was after. When I re

Re: [PHP] mysql if empty

2007-04-10 Thread Richard Lynch
I am amazed by the sheer number of just plain WRONG answers to this one... Were they all from April 1 or something?... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Gen

Re: [PHP] mysql if empty

2007-04-10 Thread Richard Lynch
$result == "" means: Your SQL query is so f'ed up, I couldn't even run it. It does NOT mean: Your query returned zero rows, a perfectly normal and common condition. You want http://php.net/mysql_num_rows And, actually, $result is FALSE, not really "", when the query is wrong. On Mon, April 9, 2

Re: [PHP] mysql if empty

2007-04-10 Thread Jim Lucas
[EMAIL PROTECTED] wrote: If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not exist... $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; $result = mysql_query($sql); if ($resul

Re: [PHP] mysql if empty

2007-04-10 Thread tedd
At 10:18 PM +0100 4/9/07, <[EMAIL PROTECTED]> wrote: If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not exist... $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; $result = my

Re: [PHP] MySQL exceptions

2007-04-09 Thread Jochem Maas
Davi wrote: > Hi all! > > I'm developing an OOP app using PHP 5. > I want to use try-catch with mysql functions. > > So, the question is: what are the exceptions classes of MySQL? > Where can I found it? IIRC mysqli (certainly not mysql) extension does not throw exceptions, so write code that ch

[PHP] MySQL exceptions

2007-04-09 Thread Davi
Hi all! I'm developing an OOP app using PHP 5. I want to use try-catch with mysql functions. So, the question is: what are the exceptions classes of MySQL? Where can I found it? TIA -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] -- Agora com fortune: "BOFH Excuse #426: internet is neede

Re: [PHP] mysql if empty

2007-04-09 Thread Satyam
ssage - From: <[EMAIL PROTECTED]> To: Sent: Monday, April 09, 2007 11:18 PM Subject: [PHP] mysql if empty If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not ex

Re: [PHP] mysql if empty

2007-04-09 Thread Paul Novitski
At 4/9/2007 02:18 PM, [EMAIL PROTECTED] wrote: If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not exist... $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; $result = mysql_que

Re: [PHP] mysql if empty

2007-04-09 Thread Davi
Em Segunda 09 Abril 2007 18:27, Lori Lay escreveu: > [EMAIL PROTECTED] wrote: > > If I search for something in mysql that returns an empty result I cant > > get it to return > > "No result found" always returns "Found" even though the recoed does > > not exist... > > > > > > $sql = "SELECT Client F

Re: [PHP] mysql if empty

2007-04-09 Thread Lori Lay
[EMAIL PROTECTED] wrote: If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not exist... $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; $result = mysql_query($sql); if ($resul

Re: [PHP] mysql if empty

2007-04-09 Thread afan
> If I search for something in mysql that returns an empty result I cant get > it to return > "No result found" always returns "Found" even though the recoed does not > exist... > > > $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; > > $result = mysql_query($sql); > > if ($result == "") >

[PHP] mysql if empty

2007-04-09 Thread chris
If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not exist... $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; $result = mysql_query($sql); if ($result == "") { echo "No result

[PHP] Re: php-mysql problem

2007-04-03 Thread itoctopus
$sql = "SELECT count(Email) as numEmails, Email FROM mena_guests WHERE Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID, $items_numbers_list"; I answered this morning, I don't know why it got deleted -- itoctopus - http://www.itoctopus.com ""Me2resh Lists"" <[EMAIL PROTECTED]>

Re: [PHP] php-mysql problem

2007-04-03 Thread clive
if I asked you whether your wife/girlfriend enjoyed having sex with your best friend while you are at work then you may or may not know the answer but it is hopefully clear that this is not the list to ask such a question (but no doubt that there is a list somewhere that caters to that kind of s

Re: [PHP] php-mysql problem

2007-04-03 Thread clive
cajbecu wrote: clive wrote: Me2resh Lists wrote: the query is : $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list"; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. so, you don`t know the answer,

Re: [PHP] php-mysql problem

2007-04-03 Thread Jochem Maas
cajbecu wrote: > clive wrote: >> Me2resh Lists wrote: >>> the query is : >>>$SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' >>> LIMIT $startingID,$items_numbers_list"; >> the only php I see it $SQL,$startingID,$items_numbers_list. This is a >> mysql question. >> > > so, you

Re: [PHP] php-mysql problem

2007-04-03 Thread cajbecu
clive wrote: > Me2resh Lists wrote: >> the query is : >>$SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' >> LIMIT $startingID,$items_numbers_list"; > > the only php I see it $SQL,$startingID,$items_numbers_list. This is a > mysql question. > so, you don`t know the answer,

RE: [PHP] php-mysql problem

2007-04-03 Thread Jim Moseby
> i need help regarding a sql query in my php app. > > the query is : > $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE > Voted = 'yes' > LIMIT $startingID,$items_numbers_list"; > > i want to sort this query by the number of the repeated EMail counts. > can anyone help me with that ple

Re: [PHP] php-mysql problem

2007-04-03 Thread clive
Me2resh Lists wrote: the query is : $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list"; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] Re: php-mysql problem

2007-04-03 Thread itoctopus
$sql = "SELECT count(Email) as numEmails, Email FROM mena_guests WHERE Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID, $items_numbers_list"; -- itoctopus - http://www.itoctopus.com ""Me2resh Lists"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi > i need hel

Re: [PHP] php-mysql problem

2007-04-03 Thread Jochem Maas
Me2resh Lists wrote: > hi > i need help regarding a sql query in my php app. > > the query is : >$SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' > LIMIT $startingID,$items_numbers_list"; > > i want to sort this query by the number of the repeated EMail counts. > can anyone

[PHP] php-mysql problem

2007-04-03 Thread Me2resh Lists
hi i need help regarding a sql query in my php app. the query is : $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list"; i want to sort this query by the number of the repeated EMail counts. can anyone help me with that please ?

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-27 Thread Richard Lynch
arík [mailto:[EMAIL PROTECTED] >> Sent: Sunday, February 25, 2007 12:50 PM >> To: php-general@lists.php.net >> Subject: [PHP] PHP+MySQL website cache ? Yes/No >> >> Hi, >>I am making an eshop and I am thinking about caching system. >> >> You underst

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-27 Thread Richard Lynch
Are you making a single eshop for just one store, or are you planning on your eshop being distributed to a zillion users?... Cuz unless your store gets a MILLION hits, the generation of static HTML instead of just using PHP will probably not save you very much at all. Write the application the mo

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Sancar Saran
Hi, If you able to access memcached. Use memcached. Put your shopping chart items, rendered html items in memcached. It was MUCH faster solution... Regards Sancar On Sunday 25 February 2007 13:59, Martin Zvarík wrote: > This benchmark is not very accurate, but you are right the database > con

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
This benchmark is not very accurate, but you are right the database connection took most of the time. Shopping cart is stored in session - not in database. I am half-way doing the eshop I bet it will took much more than 0.01 sec to generate the final version. I was going to make this file ca

[PHP] Re: PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Colin Guthrie
Martin Zvarík wrote: > I did a benchmark with and without caching to HTML file and it's like: > > 0.0031 sec (with) and 0.0160 sec (with database) > > I know these miliseconds don't matter, but it will have significant > contribution in high-traffic website, won't it? I would say yes. A good cac

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread lists
Quoting Martin Zvarík <[EMAIL PROTECTED]>: I did a benchmark with and without caching to HTML file and it's like: 0.0031 sec (with) and 0.0160 sec (with database) I know these miliseconds don't matter, but it will have significant contribution in high-traffic website, won't it? Martin -- PHP

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
I did a benchmark with and without caching to HTML file and it's like: 0.0031 sec (with) and 0.0160 sec (with database) I know these miliseconds don't matter, but it will have significant contribution in high-traffic website, won't it? Martin -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Martin Zvarík [mailto:[EMAIL PROTECTED] Sent: Sunday, February 25, 2007 12:50 PM To: php-general@lists.php.net Subject: [PHP] PHP+MySQL website cache

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Peter Lauri
[mailto:[EMAIL PROTECTED] Sent: Sunday, February 25, 2007 12:50 PM To: php-general@lists.php.net Subject: [PHP] PHP+MySQL website cache ? Yes/No Hi, I am making an eshop and I am thinking about caching system. You understand, that it cannot be entirely cached because visitor has it's own sho

[PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
Hi, I am making an eshop and I am thinking about caching system. You understand, that it cannot be entirely cached because visitor has it's own shopping cart etc. So, my thought is to cache only few blocks like "Categories", "Navigation menu" etc. by storing it to an HTML file. The advant

Re: [PHP] PHP/MySQL Create DB user

2007-02-07 Thread Chris
Stephen wrote: There seems to be no PHP function to create a DB user. It doesn't have one to create a database either... php can't do everything for you ;) I am trying to automate setting up virtual domains in a shared environment. Am I missing something obvious? http://dev.mysql.com/doc

[PHP] PHP/MySQL Create DB user

2007-02-07 Thread Stephen
There seems to be no PHP function to create a DB user. I am trying to automate setting up virtual domains in a shared environment. Am I missing something obvious? Thanks Stephen

Re: [PHP] Php / MySQL DESC tablename

2007-01-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-21 03:05:49 -0500: > I am trying to do a DESC table_name using PHP so it looks like it would it > you did it from the command line. > > i.e. > > | Field | Type | Null | Key | Default | Extra | > +---+--+--+-+-

[PHP] Php / MySQL DESC tablename

2007-01-21 Thread Beauford
Hi, First off thanks to everyone for the previous help. I managed to get it sorted out and used several of the suggestions made. I am trying to do a DESC table_name using PHP so it looks like it would it you did it from the command line. i.e. | Field | Type | Null | Key | Default |

Re: [PHP] Mysql strategy

2006-11-22 Thread Dotan Cohen
On 22/11/06, tedd <[EMAIL PROTECTED]> wrote: At 1:50 PM +0200 11/22/06, Dotan Cohen wrote: >Thanks, Richard. I'm looking into the full text index again. > >Dotan Cohen Dotan: The following is a great reference -- the code works and it gave me the basics to do full-text searches. http://www.php

Re: [PHP] Mysql strategy

2006-11-22 Thread tedd
At 1:50 PM +0200 11/22/06, Dotan Cohen wrote: Thanks, Richard. I'm looking into the full text index again. Dotan Cohen Dotan: The following is a great reference -- the code works and it gave me the basics to do full-text searches. http://www.phpfreaks.com/tutorials/129/0.php Go though tha

Re: [PHP] Mysql strategy

2006-11-22 Thread Dotan Cohen
On 21/11/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sun, November 12, 2006 6:02 pm, Dotan Cohen wrote: > If I have to perform 30 LIKE searches for different keywords in a > varchar field, which strategy would be recommended: > 1) 30 searches, one for each keyword > 2) To select the varchar f

Re: [PHP] Mysql strategy

2006-11-15 Thread David Tulloh
Chris wrote: David Tulloh wrote: Dotan Cohen wrote: If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword 2) To select the varchar field from all the rows, and search through them with php's arr

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