Re: what is wrong with php?

2002-06-16 Thread Julie Meloni

AC> I find php slow when accessing mysql.  When I do

AC> $sql='select count(*) from table';
AC> $result = mysql_query($sql);

AC> It takes 10 sec to return. Is this normal speed for php

Not at all.

If you need help in tuning your server from a PHP and Apache
standpoint, the PHP mailing lists are full of folks to help.
http://www.php.net/mailing-lists.php


- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re[2]: use of substring()

2002-06-13 Thread Julie Meloni

NW> Ooops, reserved word! Works great ;-)
NW> Any way to add something to it like "" or should I do that in my
NW> php?

concat()  is your friend!


- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re[2]: use of substring()

2002-06-13 Thread Julie Meloni


>> SELECT datefield, SUBSTRING(textfield, 1, 30) as description FROM
>> tablename WHERE id = 2;

single quotes around textfield...



- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: use of substring()

2002-06-13 Thread Julie Meloni

Hi -

NW> I have a table (for example) with three cols 'id' | 'date' | 'text' 
NW> I want to return just 'date' and the first 30 chars from 'text'

NW> I've tried this sql:

NW> SELECT date, SUBSTRING(text, 0,30) as description FROM table WHERE id = 
NW> '2';

Start with position 1.

SELECT datefield, SUBSTRING(textfield, 1, 30) as description FROM
tablename WHERE id = 2;


- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




which parameter to tune?

2002-05-07 Thread Julie Meloni

Hi -

Before I start fiddling with buffer sizes and what not, is there any
documented issue with truncated results of concat_ws() within joined
tables, when using an order by clause?

Using MySQL 3.23.48 on Linux.  Will post SQL queries and table structure if
there's not just an answer somewhere that I haven't yet found.

Thanks much!

- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: undefined function: mysql_connect()

2002-04-24 Thread Julie Meloni

TK> Hello, i'm trying to use PHP4 and MySQL and i'm getting undefined function:
TK> mysql_connect() 

This question  belongs on a/the PHP mailing list, but the answer is that
you need to compiled PHP --with-mysql.  Please read the PHP
installation instructions in the very handy manual at
http://www.php.net/manual/



- Julie

--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com

Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php