RE: [PHP] Inserting into multiple tables

2010-04-10 Thread Tommy Pham
7;,'$fax','$email')". > "INSERT INTO name (fname, lname)"."VALUES('$fname','$lname')"; > > $result = mysqli_query($dbc, $query) > or die('Error querying database.'); > I see 2 problems: 1) your sql

Re: [PHP] Determining Top # from MySQL

2010-04-10 Thread vikash . iitb
If you want to take top 5: SELECT num, COUNT( num ) as c FROM table GROUP BY num order by c desc limit 5 Thanks, Vikash Kumar -- http://vika.sh On Sun, Apr 11, 2010 at 8:07 AM, Dan Joseph wrote: > Eh, he's off topic, but we've talked plenty SQL on here before... > > SELECT num, COUNT( num ) F

Re: [PHP] Inserting into multiple tables

2010-04-10 Thread Gary
>> inserts succeed or fail together (it would cause issues down the road if >>> one >>> table insert worked and another failed.) Additionally, I'd recommend >>> using >>> prepared statements to avoid SQL injection (I'd mention valida

Re: [PHP] Inserting into multiple tables

2010-04-10 Thread Adam Richardson
T >> data, too ;) >> >> See the tutorial below: >> http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html >> >> Adam >> >> -- >> Nephtali: PHP web framework that functions beautifully >> http://nephtaliproject.com >> >> &g

Re: [PHP] Determining Top # from MySQL

2010-04-10 Thread Dan Joseph
Eh, he's off topic, but we've talked plenty SQL on here before... SELECT num, COUNT( num ) FROM table GROUP BY num; I don't have a myqsl server to test that, but should do it. -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code "NEWTHINGS" for 10% off

Re: [PHP] Determining Top # from MySQL

2010-04-10 Thread Kevin Kinsey
Ashley M. Kirchner wrote: Given a MySQL query like this $q = "select num from table", I get a result like this: +---+ |num| +---+ | 1| | 4| | 6| | 2| | 4| | 5| | 3| | 2| | 4| | 2| | 3| | 3| | 2| | 1| +---+ What I want is a listing of numbers sorted by the amoun

[PHP] Determining Top # from MySQL

2010-04-10 Thread Ashley M. Kirchner
Given a MySQL query like this $q = "select num from table", I get a result like this: +---+ |num| +---+ | 1| | 4| | 6| | 2| | 4| | 5| | 3| | 2| | 4| | 2| | 3| | 3| | 2| | 1| +---+ What I want is a listing of numbers sorted by the amount of times they appear

[PHP] Re: PHP execute very slow : PHP Version 5.2.6

2010-04-10 Thread Kristijan Marin
one more thing ... I use lot of includes in the code to display some specific content BR, Kris ""Kristijan Marin"" wrote in message news:06.35.16158.4e021...@pb1.pair.com... > Hi, > > > > I'm experiencing very slow performance of my php scripts ... At first and > for a long time I though

[PHP] PHP execute very slow : PHP Version 5.2.6

2010-04-10 Thread Kristijan Marin
Hi, I'm experiencing very slow performance of my php scripts ... At first and for a long time I thought it was Oracle fault cause I didn't use binding (I rewrote the code ), but the performance is still bad. So I tested my sql statement and did some time measurement and found out that Oracl

Re: [PHP] Inserting into multiple tables

2010-04-10 Thread Gary
l Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com __ Information from ESET NOD32 Antivirus, version of virus signature database 5016 (20100410) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com

Re: [PHP] Inserting into multiple tables

2010-04-10 Thread Adam Richardson
On Sat, Apr 10, 2010 at 5:27 PM, Gary wrote: > I am experimenting with multiple tables, it is only a test that is my local > machine only. This is the current code, which does not work , I have tried > to concatonate the insert statements. I have tried multiple $query > variables, but it is just

[PHP] Inserting into multiple tables

2010-04-10 Thread Gary
ntitled Document First Name Last Name Street Address Town State Zip Code Telephone Fax E-Mail Comments __ Information from ESET Smart Security, version of virus signature database 5016 (20100410) __ The message was checked by ESET Smart Security. htt

[PHP] wiki api help needed with php

2010-04-10 Thread saeed ahmed
I'm trying to do build a system which is described below. "The user inputs a word. The system check if word exists at portuguese section of wiktionary. If true, get and show to user the word definiton. If false, sugest (displays) similar words, as in Wiktionary, with her links." I have done this

Re: [PHP] 404 redirects "stolen" by provider

2010-04-10 Thread Merlin Morgenstern
Am 09.04.2010 23:15, schrieb Peter Lind: On 9 April 2010 23:08, Merlin Morgenstern wrote: Am 09.04.2010 22:58, schrieb Peter Lind: On 9 April 2010 22:20, Merlin Morgensternwrote: This sounds like the best solution to me. The only problem is that my regex knowledge is p