Re: [PHP] Trunkated zeros..... how to fix?

2001-09-05 Thread ERISEN, Mehmet Kamil
use zerofill for the column when you create the table! --- Dallas K. [EMAIL PROTECTED] wrote: I am having the problem that Mysql is truncating the zeros from both the int and char fields when I try to insert How can I fix this. example: 0123 in PHP = 123 in mysql 3210 in PHP =

Re: [PHP] GOOD web hosting

2001-09-04 Thread ERISEN, Mehmet Kamil
Hello, You may want to check out connecticut-web.com I use their $36/year plan for several domains. They are always up and running. They provide mysql+php support. --- Jason Bell [EMAIL PROTECTED] wrote: I recently moved all of my domains to www.prohosters.com and have been nothing but

Re: [PHP] accessing a global in a function???

2001-09-04 Thread ERISEN, Mehmet Kamil
I have seen people using include (config.php); in the begining of the page for that purpose. --- Aaron Moore [EMAIL PROTECTED] wrote: Sorry about the newbie question. I have a config.php file which contains a string which I would like a function to access. How do i make it global so that

[PHP] Chat / IRC

2001-08-31 Thread ERISEN, Mehmet Kamil
HEllo, Did anybody have a luck with a good Chat Program.? Thanks, Mehmet. = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com -- PHP General

Re: [PHP] sql query with join and same column twice...

2001-08-30 Thread ERISEN, Mehmet Kamil
Please try select dest.dest_name, air.name as airport1, air2.name as airport2 from destination, airport air, airport air2 where dest.airport_dep_id_id=air.airport_id and dest.airport_arr_id=air2.airport_id; you can use the same table as manu times as you like in sql.

Re: [PHP] Re: Count()

2001-08-29 Thread ERISEN, Mehmet Kamil
$sql = SELECT COUNT(*) AS myCount FROM Products; $result = mysql_query($sql); $count = mysql_result($result,0); --- Kevin P [EMAIL PROTECTED] wrote: I have counted some rows in MySQL and I need to know how to pull out the number of rows. SELECT COUNT(*) AS myCount FROM Products --

Re: [PHP] fix my query please

2001-08-29 Thread ERISEN, Mehmet Kamil
Hello Jeremy, Two things: FROM users LEFT OUTER JOIN picks using(id) Where users.uid picks.user_id 1- when you do OUTER join, you do NOT have to use the . That's what outher join means. 2- what is id? Is it a column? shouldn't it be uid? Maybe that's your problem. --- Jeremy Morano

Re: [PHP] double check query statement??

2001-08-28 Thread ERISEN, Mehmet Kamil
Hi it may sound funny, but you may want to add a space at the end of lines before . I mean $query = SELECT mpn_job.ID, job, assigned_to, status_date, category ; $query .= FROM mpn_job, mpn_job_category WHERE CID = mpn_job_category.ID ; $query .= AND category =

Re: [PHP] PHP/mySQL query problem...

2001-08-27 Thread ERISEN, Mehmet Kamil
Yes, there is a problem. -- SELECT * FROM links WHERE 1=1 and ( name LIKE %te% OR description LIKE %te% OR url LIKE %te% ) AND approved=1 LIMIT 5; -- --- Jeff Lewis [EMAIL PROTECTED] wrote: Guys, why isn't this working? :) SELECT * FROM links WHERE name LIKE %te% OR description LIKE

Re: [PHP] clause

2001-08-27 Thread ERISEN, Mehmet Kamil
Hello Jeremy, you are using two tables, but you are not joining them. What's you goal? --- Jeremy Morano [EMAIL PROTECTED] wrote: Hi, Can somebody help me out? My where clause is completely being ignored. More specifically the . I tried to use != and that didn't work either. However,

Re: [PHP] clause

2001-08-27 Thread ERISEN, Mehmet Kamil
HEllo, I think this will better work. What Jeremy wants to do is to OUTER joing the tables: SELECT distinct users.uid , users.username FROM users LEFT OUTER JOIN picks using(uid) may do the trick. If you say letf join and the use ids not equal in the where, then I think it's same as saying:

Re: [PHP] PHP / MySQL Hosting Charges

2001-08-24 Thread ERISEN, Mehmet Kamil
Hello All, I think for a thin page with PHP+mySQL you can go as low as $3 a month (35MB) I have seen decent packages, with Vserver privileges at around $18/mnt. --- Alnisa Allgood [EMAIL PROTECTED] wrote: At 4:09 PM +1000 8/24/01, Chris Aitken wrote: Hi All, Just a quick non-technical

Re: [PHP] limit 1

2001-08-24 Thread ERISEN, Mehmet Kamil
This is a sql question: Limit is limiting number of records that will come out of query. So, it would not work. SELECT users.names FROM users, selection Where users.name = selection.name and setting = 'on' ; you could use SELECT DISTINCT users.names FROM users, selection Where

Re: [PHP] numrows

2001-08-23 Thread ERISEN, Mehmet Kamil
Hello, Chris, with all due respect, DESC is a reserved word for SQL. is english ORDER BY ID DESC meand sort by id in descending order. Martin, your SQL seems to be fine. Are you sure that you are connected to your database. I have run the following SQL against my database SELECT * FROM users

Re: [PHP] GET method and forms....

2001-08-22 Thread ERISEN, Mehmet Kamil
instead of method=GET use method=POST --- Seb Frost [EMAIL PROTECTED] wrote: how do I prevent getting submit=shop%21 in the url window? form method=GET action=page.php4 pEmail address: input type=text name=email size=20 input type=submit value=Shop! name=submit

[PHP] how expensive is Image functions?

2001-08-21 Thread ERISEN, Mehmet Kamil
Hello All, How expensive are the image functions as far as the system resources go. Would it be too expensive to use php to create simple gifs like buttons, tabs etc. Thanks, Erisen ulrAslan. = Mehmet Erisen http://www.erisen.com __ Do

[PHP] mySql_fetch_array($result) question.

2001-08-21 Thread ERISEN, Mehmet Kamil
Hello All, Another question. Here is the problem: - One SQL query - 1 result. I have a form that has more than one drop down lists. I like to use the mysql_fetch_array($result) to populate the select options. The problem is that after the first use, the mysql_fetch_array($result) does not

Re: [PHP] Is this a bug?

2001-08-20 Thread ERISEN, Mehmet Kamil
you are right. ?php if (6448234192168122==6448234192168125) { echo 'A' ; } else { echo 'B' ; } ? I tested with 99644xxx and 964 It printed A. However, if you are down to 644xxx is prints B which is correct. Perhaps a limitation of 16 digits. ? good catch --- Ratko [EMAIL PROTECTED]

[PHP] MySQL Error.

2001-08-17 Thread ERISEN, Mehmet Kamil
Hello All, I receive the following warning message. When I reload the page, the message is the error message does not show up again. Funny thing is, that there are other parts of the page generated from the same database using the same mysql_pconnect and they are fine. I am using a standard

Re: [PHP] Adding records to a MySql database

2001-08-17 Thread ERISEN, Mehmet Kamil
In adition to that, you may want to check out the online documentation on the www.php.net website. Find the section under mySQL. If you know how to manipulate data using SQL, php apis are very easy to use .. www.mysql.com could be good resource for you as well. if you have a specific

[PHP] SESSION question.

2001-08-17 Thread ERISEN, Mehmet Kamil
Hello, I have implemented a user login with PHP Session functions. THe problem I have is that if the user is logged in the site using http://mysite.com/login.php and starts a session, the session is not recognized when user is trying to utilize the site with http://www.mysite.com/dosomething.php

Re: [PHP] Adding records to a MySql database

2001-08-17 Thread ERISEN, Mehmet Kamil
Hello, I am using the PHPMyAdmin for that. There is a website www.phpwizard.net that you can download phpMyAdmin. Hope this helps. Mehmet. --- Dave.O [EMAIL PROTECTED] wrote: I have read the documentation already. I am trying to create a directory, which information can be added and

Re: [PHP] Adding records to a MySql database

2001-08-17 Thread ERISEN, Mehmet Kamil
Here is how this is done: $sql = insert into employees values ('10','John','Smith','Engineer') ; $result = mysql_query($sql) or die ('Insert failed'); with php, you can execute any SQL statement as long as you have access... to update a table $sql = update employees set job =

Re: [PHP] Is there a special character I here?

2001-08-16 Thread ERISEN, Mehmet Kamil
I use a javascript to do that for my forms: if (window.RegExp) { var reg = new RegExp(^[_0-9a-z]*$,gi); if (!reg.test(f.elements['username'].value)) { alert(Kullanici adi harf ve/veya rakamlardan olusmalidir. Lutfen Duzeltiniz!); f.elements['username'].focus(); return(false); }