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
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
>> 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
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
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
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
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
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
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
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
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
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
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
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
14 matches
Mail list logo