Re: [PHP] Help with MySQL

2009-02-13 Thread Waynn Lue
You can type "show create table " to see the datatypes.

Waynn

On 2/13/09, James Colannino  wrote:
> Hey everyone.  I've been reading the list for a long time, but have only
> really posted to the mailing list a few times.  I just had a quick
> question about MySQL.  I'm not sure if this is exactly relevant to PHP,
> but it is for a PHP application I'm writing, so hopefully that makes
> this question ok :)
>
> Basically, I was wondering if there are any queries in MySQL that I can
> use to determine the data types used to construct a pre-existing table.
> The reason I ask is that I went back to look at the data in a table I've
> been using for a while and realized that I forgot to document what the
> data types were (DOH!)  I'm sure there's something, but I wasn't quite
> sure what to google for, so I wasn't really able to turn up anything.
>
> Thanks!
>
> James
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] help with mysql

2004-01-26 Thread Renan G. Galang
could you send the line 16 the parser was pointing out?
(B
(BIt could be you have the wrong number of parameters for the call to
(Bmysql_connect(), or your PHP wasn't compiled with mysql functionality
(Benabled. (This is doubtful since mysql functionality is ON by default).
(B
(B
(B- Original Message - 
(BFrom: "Tom Flood" <[EMAIL PROTECTED]>
(BTo: <[EMAIL PROTECTED]>
(BSent: Tuesday, January 27, 2004 2:27 PM
(BSubject: [PHP] help with mysql
(B
(B
(B> Hello,
(B>
(B> I am just beginning my learning of php and its uses with mysql.  I wrote a
(B> small program to add information into a mysql database.  However my script
(B> returns the following error:
(B>
(B> Fatal error: Call to undefined function: mysql_connect() in
(B> /var/www/html/ephi/mysql.php on line 16
(B>
(B> what is the problem here? How can I fix it?
(B>
(B> I truly appreciate any help given.
(B>
(B> Tom Flood
(B> [EMAIL PROTECTED]
(B>
(B> -- 
(B> PHP General Mailing List (http://www.php.net/)
(B> To unsubscribe, visit: http://www.php.net/unsub.php
(B>
(B>
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] help with mysql query / logic

2002-10-10 Thread Pablo Oliva

Please disregard, I think that I figured it out.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] help with mysql query / logic

2002-10-10 Thread Marco Tabini

Can you perhaps post the structure of your tables? That would make it
easier to help (at least for me)


On Thu, 2002-10-10 at 15:40, Pablo Oliva wrote:
> I have 2 tables, one with job ad information, and a second one with the
> locations that this ad applies to.
>  
> When a person queries the job ad table with their criteria, I would also
> have to query the location table to see if the location that they chose
> applies to this ad.  I am not sure how to construct the sql query
> though, or if there is a better way to set this up.
>  
> Any suggestions will be appreciated.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: Re: [PHP] Help with MySQL.

2002-03-05 Thread Dan Vande More

I'm sorry after re-reading the correct answer would be this:
The hostname(ip address) of the mysql box is whatever you telnet too, if
indeed you get those weird characters when you 'telnet localhost 3306'. 
For instance if you telnet to 192.168.0.1, that is the mysql server address.
If you telnet to 'server1.myisp.com' or 'server1' that is the address.
The hostname and ip address are very much interchangeable, though as a
general rule of thumb, ip address is more reliable.
Dan


-Original Message-
From: Dan Vande More [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Re: [PHP] Help with MySQL.

For one of my servers I get " 3.23.34-log3REu?zk*+;,"
And another I get " 4.0.1-alpha,ZaXs]W{,"
That means that is most certainly running on it, if not you would get
something like "Telnet: Unable to connect to remote host: Connection
refused"
Be warned, if your isp does not know anything about their mysql server, they
may not know the password.
Dan

-Original Message-
From: GENESiS DESiGNS [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Re: [PHP] Help with MySQL.

Dan,

What do you mean by :

If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.

Because thats what happens. Thanks,

-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re: Re: [PHP] Help with MySQL.

2002-03-05 Thread GENESiS DESiGNS

Dan,

Running on what? I need to know the host name address.

Thanks,

-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: Re: [PHP] Help with MySQL.

2002-03-05 Thread Dan Vande More

For one of my servers I get " 3.23.34-log3REu?zk*+;,"
And another I get " 4.0.1-alpha,ZaXs]W{,"
That means that is most certainly running on it, if not you would get
something like "Telnet: Unable to connect to remote host: Connection
refused"
Be warned, if your isp does not know anything about their mysql server, they
may not know the password.
Dan

-Original Message-
From: GENESiS DESiGNS [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Re: [PHP] Help with MySQL.

Dan,

What do you mean by :

If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.

Because thats what happens. Thanks,

-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re: [PHP] Help with MySQL.

2002-03-05 Thread GENESiS DESiGNS

Dan,

What do you mean by :

If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.

Because thats what happens. Thanks,

-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Help with MySQL.

2002-03-05 Thread Dan Vande More

Once in your telnet session, from the command line type
'telnet localhost 3306' or 'telnet 127.0.0.1 3306'
Keep in mind this only proves the host is there, it doesn't disprove. The
machine may not know itself as localhost(unlikely) or the mysql server may
not be living on 3306.
If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.
Dan

-Original Message-
From: GENESiS DESiGNS [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 7:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help with MySQL.

Hello everyone,

I need some help with telneting to my web host and figuring out what the
host name address is to mysql. 

My web host (which is my ISP) knows that they have MySQL but they don't know
the host name address. I want to know if there is a sentence I can type into
the telnet box to see what my MySQL host name address is? I tried 'whereis
mysql' and it came back 'mysql: /usr/bin/mysql /usr/lib/mysql
/usr/share/mysql /usr/man/man1/mysql.1.gz' so I know I have it, but whats
the host name address? Thanks dudes!


-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Help with mysql query

2001-12-11 Thread Kevin Stone

Daniel,

Try this.  Still sort of a brute force method but just 10 query strings
instead of 50 but nothing MySQL is going to balk at.



Then you an print out the results stored in the $num_vals list using a
similar for loop.

-Kevin Stone


- Original Message -
From: "Daniel Alsén" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Tuesday, December 11, 2001 4:09 PM
Subject: [PHP] Help with mysql query


> Even if this isn´t a mysql forum i hope to get some help on this:
>
> I have a table with 5 columns (named one to five) which contains numerical
> values between 1 and 10.
> I am trying to construct a query that gives me the count of the
> representation of each numerical value (ie how many fives that are
stored).
>
> Can i do this in a smart way without having to write fifty queries and add
> every fifth of them up?
>
> Regards
> # Daniel Alsén| www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   | +46 8 694 82 22  #
> # PGP: http://www.mindbash.com/pgp/  #
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] help with Mysql Query...

2001-09-24 Thread Steve Werby

"Christian Dechery" <[EMAIL PROTECTED]> wrote:
> I have a table A and a table B... I want all occurences from A there are
> not in B...
>
> in ANSI SQL... it's nothing more than:
>
> select a.id, a.name from table_a a, table_b b where a.id NOT IN (select id
> from table_b)
>
> and that's it... but in Mysql, since there are no sub-selects, I'm burning
> my brains out and not getting it... I don't wanna create a temp table like
> the manual suggests... this is way NOT efficient... I'd rather do it in
PHP
> code than having a query that creates a temporary table, then drop it...

No temp table necessary.  Use a LEFT JOIN.

SELECT * FROM table_a
LEFT JOIN table_b
ON table_a.id = table_b.id
WHERE table_b.id IS NULL

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]