[PHP-DB] mysql_result

2001-03-20 Thread Shahmat Dahlan
I'm trying to use mysql_result to extract data from one particular field in a record. So I suppose the most viable solution is to use mysql_result. But when I do this: $sqlstmt="SELECT * FROM dept WHERE shortname=$shortname"; $result=mysql_query($sqlstmt);

Re: [PHP-DB] mysql_result

2001-03-20 Thread Shahmat Dahlan
I've tried what you suggested and it works, thanks. Russ Michell wrote: Try: $sqlstmt="SELECT * FROM dept WHERE shortname='$shortname'"; //Include single quotes.. Russ #---# "Believe nothing - consider everything" Russ

Re: [PHP-DB] mysql_result

2001-03-20 Thread Shahmat Dahlan
That didn't quite work, I tried using single quote enclose within double quotes and it works. $sqlstmt="SELECT * FROM dept WHERE shortname='$shortname'"; Thanks anyway ben wrote: On Tue, 20 Mar 2001, Shahmat Dahlan wrote: I'm trying to use mysql_result to extract data from one

[PHP-DB] Loading extensions

2001-03-20 Thread Shahmat Dahlan
I have IIS 4 with PHP 4pl1 running on Win NT 4. I can't seem to load the (*.dll) extensions. There seem to be something wrong with the extension path. The browsercap.ini path is pointing to the right path. Can anyone help? Thanks in advance. Shahmat -- PHP Database Mailing List

[PHP-DB] php with mysql - multiple tables

2001-04-15 Thread Shahmat Dahlan
I have three tables, whereby I have used a select statement to extract some of the fields from each and one of the tables. e.g. $sqlstmt ="SELECT stock_in.id, equip.equip_type, equip.brand, equip.model, vendor.name "; $sqlstmt.="FROM stock_in,equip,vendor "; $sqlstmt.="WHERE equip.id=equip_id

Re: [PHP-DB] php with mysql - multiple tables

2001-04-15 Thread Shahmat Dahlan
PROTECTED], [EMAIL PROTECTED] ("Shahmat Dahlan") wrote: $result=mysql_query($sqlstmt); I know the $sqlstmt query does work. But if I do a mysql_fetch_array and assign it to a variable called $myrow, while ($myrow=mysql_fetch_array($result)) { ... } how do I dis

[PHP-DB] Updating multiple forms

2001-04-18 Thread Shahmat Dahlan
How do I update data into multiple forms? Thanks in advance.. Shahmat

Re: [PHP-DB] Updating multiple forms

2001-04-18 Thread Shahmat Dahlan
Apologies... Lemme rephrase my question, How do I update data into multiple tables in MySQL? Shahmat Lester June Cabrera wrote: Hi, What do you mean by updating data into multiple forms? Do you mean displaying data in multiple HTML forms? Lester At 04:53 PM 4/18/01 +0800, Shahmat

Re: [PHP-DB] Updating multiple forms

2001-04-18 Thread Shahmat Dahlan
? Lester At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote: How do I update data into multiple forms? Thanks in advance.. Shahmat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

[PHP-DB] Error Msg: Wrong data type when performing extract()

2001-04-18 Thread Shahmat Dahlan
$sqlstmt ="SELECT stock_in.id, equip.equip_type, "; $sqlstmt.="equip.brand, equip.model, "; $sqlstmt.="vendor.name, stock_in.po_no, "; $sqlstmt.="stock_in.vendor_sales_no, stock_in.cust_po_no, "; $sqlstmt.="stock_in.serial, stock_in.warranty, stock_in.date_received, "; $sqlstmt.="stock_in.remark,

Re: [PHP-DB] Error Msg: Wrong data type when performing extract()

2001-04-19 Thread Shahmat Dahlan
You're right, no row was returned by the query when i did tried to fetch it. So I suppose the next viable thing to do is to figure what went wrong with the query. Thanks CC Zona wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Shahmat Dahlan") wrote: $result=mysql_quer

Re: [PHP-DB] MySQL Connect Problem

2001-05-15 Thread Shahmat Dahlan
Is the MySQL and Apache running on the same machine? Jeff Oien wrote: I have MySQL on a new Win2000 install and can't connect to it using PHP. I am able to connect using the command line. I'm not sure what the next step is to troubleshoot. I've checked the username and password in the .ini

Re: [PHP-DB] MySQL Connect Problem

2001-05-18 Thread Shahmat Dahlan
If this is the case, you need to check the rights that your id jeff has. It should be in the mysql database under the tablename user. You have to make sure that you have all the rights, all the priviliges equals to 'Y'. I'm not really sure how these previiliges, but you can just set everything

[PHP-DB] Merge two arrays into associative arrays?

2001-05-21 Thread Shahmat Dahlan
Is there anywhere possible for me to merge two arrays into associative arrays? e.g. $a=array(1,2,3,4,5); $b=array(a,b,c,d,e) into $c=array(1 = a, 2 = b, etc... ) Thanks in advance.. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP-DB] Merge two arrays into associative arrays?

2001-05-22 Thread Shahmat Dahlan
www.ljweb.com - Original Message - From: Jonathan Hilgeman [EMAIL PROTECTED] To: 'Shahmat Dahlan' [EMAIL PROTECTED] Cc: PHP-DB (E-mail) [EMAIL PROTECTED] Sent: Monday, May 21, 2001 6:10 PM Subject: RE: [PHP-DB] Merge two arrays into associative arrays? try: $a=array(1,2,3,4,5); $b

Re: [PHP-DB] Query in a function

2001-06-26 Thread Shahmat Dahlan
How about declaring some of the variables as global variables. regards seriousj wrote: Hello I have a query that I have placed in a function that is in a file that I include in the page to be displayed. It doesn't work. I know that the code works because when I place the code in the page

[PHP-DB] Access counter

2001-07-23 Thread Shahmat Dahlan
I'd like to do a counter with PHP, how do you do this? I thought maybe I could either use cookie or session or session? Which should I use ? regards and thanks is adnved -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP-DB] Access counter

2001-07-23 Thread Shahmat Dahlan
3. write update 3.5 print number of hits somewhere on webpage 4. close file... Shahmat Dahlan wrote: I'd like to do a counter with PHP, how do you do this? I thought maybe I could either use cookie or session or session? Which should I use ? regards and thanks is adnved -- PHP

[PHP-DB] PHP Binaries for Solaris 8

2001-11-15 Thread Shahmat Dahlan
How can you download PHP binaries for Solaris 8? Can't seem to find it on php.net, and some other sites. -- PHP Database 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:

Re: [PHP-DB] dlls and inis.Help.

2001-11-16 Thread Shahmat Dahlan
try this extension_dir = enable_dn=on extension=e:\apps\php\extensions\php_interbase.dll fyi, I'm running on Win NT 4, with apache 1.3.20 and php 4.06. regards DL Neil wrote: Anyone got a clue for this piece of bad luck? I'm on win2k pro + IIS5 +php4.0.6 cgi installation. It works fine

[Fwd: [PHP-DB] PHP Binaries for Solaris 8]

2001-11-19 Thread Shahmat Dahlan
In this case, if there aren't any binaries for Solaris 8, how do you compile it under Solaris 8? ---BeginMessage--- How can you download PHP binaries for Solaris 8? Can't seem to find it on php.net, and some other sites. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] PHP Build/Compile Problem

2002-01-15 Thread Shahmat Dahlan
I have configured apache according to the readme included in the apache source: ./configure --prefix=/usr/local/apache And then configure php: ./configure --with-apache=../apache_1.3.22 make make install After that configure apache again while activating the php module: ./configure

[PHP-DB] Force Refresh on Another Window w/ Javascript

2002-02-27 Thread Shahmat Dahlan
I have a question, let's say i have my main page (so called) called indexphp I have also displayed a buttonin indexphp, which i will used the onClick event to trigger a windowopen function to the same main page, indexphp (but with parameters) input type=button value=Add New Records

Re: [PHP-DB] Force Refresh on Another Window w/ Javascript

2002-02-27 Thread Shahmat Dahlan
- // From: Shahmat Dahlan [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 28 February 2002 2:36 PM // To: PHP-DB // Subject: [PHP-DB] Force Refresh on Another Window w/ Javascript // Importance: High // // // I have a question, let's say i have my main page (so called) called // index.php

[PHP-DB] Javascript

2002-10-11 Thread Shahmat Dahlan
My question might have anything to do with PHP but I have the following scenario: Say I have four fields field1 : field2 : field3 : field4 : And a total sum field, which is a total sum of the value of the expression, totalsum = field1 +

Re: [PHP-DB] R: [PHP-DB] Javascript

2002-10-11 Thread Shahmat Dahlan
) total += thisform.elements[field[]].value; } thisform.totalsum.value=total; } -Messaggio originale- Da: Shahmat Dahlan [mailto:[EMAIL PROTECTED]] Inviato: venerdi 11 ottobre 2002 11.35 A: [EMAIL PROTECTED] Oggetto: [PHP-DB] Javascript My question might have anything to do

[PHP-DB] A Question on Javascript

2002-11-13 Thread Shahmat Dahlan
I have a question on Javascript, if you don't mind. Say if I have a main page, whereby I would also have a html form which contains a button. Let's call it main document. When I click on the button it will open a new window, which refers to another html page. Now, let's call it child document.

Re: [PHP-DB] question about '

2003-07-11 Thread Shahmat Dahlan
yes, by adding stripslashes it will somewhat escape those quotes ('), but when displaying the results there will not be any need to do so. unless it is your wish to actually store the backslash into the db. Jerry wrote: I think you should use addslashes to store the text in the database and

[PHP-DB] Javascript+PHP+MySQL

2003-08-16 Thread Shahmat Dahlan
I have a question of Javascript, I don't whether anyone has experience this before, but I think some of you must have. I have the following main form, with a field called location, in which I had used the SELECT html tag and also at the same time, the content for the location field is actually

Re: [PHP-DB] mysql date select statement

2003-08-17 Thread Shahmat Dahlan
hav u tried using dashes to denote which portion is the year, month, or day ? e.g. instead of 20030101, you'd probably want to use 2003-01-01. Wendell Frohwein wrote: Hello all, I have this page where I search and add up commissions in a mysql database. I want to select commissions between a

Re: [PHP-DB] Consider upgrading MySQL client .... how do I do this?

2003-09-03 Thread Shahmat Dahlan
one way it to use old_password ()instead of password(), when creating new user name, or update the password for those existing user names with the old_password() function. but then this will force you to use the old password() function, which doesn't really help much... Vinoaj Vijeyakumaar

Re: [PHP-DB] SoS

2003-10-05 Thread Shahmat Dahlan
if the statement if (isset($id)) doesn't probably it because register_globals has been turned off maybe? How about if (isset($_GET[id])) ? [EMAIL PROTECTED] wrote: Hi, Jason: Thank you very much for your quick reply. I tried the if (isset($id)) but it doesn't work. Any thoughts? By the way,

Re: [PHP-DB] SoS

2003-10-05 Thread Shahmat Dahlan
to recompile the Php? I also tried if (isset($_GET[id])) and found out that $id is NULL. So, there will be an error in the SQL statement. Zhan Xu EECS Department Case Western Reserve University - Original Message - From: Shahmat Dahlan [EMAIL PROTECTED] Date: Monday, October 6, 2003 6:07 am

[PHP-DB] acquiring value from a sql statement which contains an alias

2003-10-20 Thread Shahmat Dahlan
I have a question, I have this SQL statement, $sql_stmt = SELECT DISTINCT EXTRACT(YEAR_MONTH FROM visitdate) AS availYearMonth FROM visitedurl;; $result = mysql_query ($sql_stmt); while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { echo $row[availYearMonth]; } By right the value that I

Re: [PHP-DB] mail function

2003-10-30 Thread Shahmat Dahlan
The textarea tag has an option called wrap, pls read below (extracted from w3c.org) TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=OFF Carriage returns and line feeds entered by the user are ignored and one line of text is sent to the server. No automatic wrapping is done, so the user must scroll

Re: [PHP-DB] Strange bahavior with mysql_fetch_array($result)

2003-11-20 Thread Shahmat Dahlan
What of the sql statement? If your sql statement had mistakes in it (be it typo, or wrongly constructed statements), it will not even execute the if (!mysql_fetch_array($result)) { } portion of your code. You might want to construct your error checking portion differently as opposed to

Re: [PHP-DB] Form action

2004-10-10 Thread Shahmat Dahlan
When I first started out with PHP, I asked the same myself the same questions as you just did. But over the years I have concluded: Method (1) centralizes all your form submission processes for addition, deletion, updating purposes, which means when you want to start debugging, you would end

Re: [PHP-DB] Connect remote DB server

2004-10-11 Thread Shahmat Dahlan
I think the mysql extension was not loaded, that's why you got the message, and it was not able to recognize the function mysql_connect. Fatal error: Call to undefined function: mysql_connect() how did you install your copy of php? compile it from source? Laurence Lim wrote: Hi all, im new to

Re: [PHP-DB] Connect remote DB server

2004-10-11 Thread Shahmat Dahlan
! Shahmat Dahlan [EMAIL PROTECTED] ??? news:[EMAIL PROTECTED] ???... I think the mysql extension was not loaded, that's why you got the message, and it was not able to recognize the function mysql_connect. Fatal error: Call to undefined function: mysql_connect() how did you install your copy of php

Re: [PHP-DB] Re: printing errors

2005-08-04 Thread Shahmat Dahlan
both mysql_error () and mysql_errno () are suppose to assist you in determining the cause of problems you may encounter with your mysql-related coding. it's not a question of knowing what php can tell you what's wrong, it's what your mysql db is telling you. you should refer to the mysql error

[PHP-DB] explode / implode function call on a field with blob type

2005-08-04 Thread Shahmat Dahlan
I have the following table structure called announcements - id int(6) - data longblob And this is what i did: $sql_stmt = SELECT id, data FROM announcements; $query = mysql_query ($sql_stmt); while ($row = mysql_fetch_object ($query)) { echo $row-id; $tmp = explode ( , $row-data, 10); #1

Re: [PHP-DB] explode / implode function call on a field with blob type

2005-08-04 Thread Shahmat Dahlan
); #2 ### echo $row-data; my mistake, it should be this: echo $data_stripped; } Shahmat Dahlan wrote: I have the following table structure called announcements - id int(6) - data longblob And this is what i did: $sql_stmt = SELECT id, data FROM announcements; $query = mysql_query ($sql_stmt

Re: [PHP-DB] explode / implode function call on a field with blob type

2005-08-04 Thread Shahmat Dahlan
My apologies, I got it all wrong, I simply went and used the split function and join those strings together, and it works. Shahmat Dahlan wrote: Correction, my corrected code (mistake in the last line, echo $row-data): $sql_stmt = SELECT id, data FROM announcements; $query = mysql_query

Re: [PHP-DB] Current web page being displayed

2005-08-07 Thread Shahmat Dahlan
You can try foreach ($_SERVER as $key = $value) echo $key = $value; or you can check out them out in when calling phpinfo (); RaJeSh VeNkAtA wrote: hai .. if u r seeing http://www.google.com/blog/myblog.php then $_SERVER[SERVER_NAME] would give u www.google.com and

Re: [PHP-DB] Current web page being displayed

2005-08-07 Thread Shahmat Dahlan
Or you can do the one show below M Saleh EG wrote: lol... print_r($_SERVER); would be enough to show you all the server array tags. On 8/7/05, *Shahmat Dahlan* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: You can try foreach ($_SERVER as $key = $value) echo $key

[PHP-DB] session

2005-08-16 Thread Shahmat Dahlan
In my php.ini I've enabled session.use_cookies=1 Everytime I initialize a session, it create the session storage file in my /tmp At the top my script, I've added session_start (); In my test login function, this was what I did: $_SESSION['username'] = 'abcdef'; session_set_cookie_params (time

[PHP-DB] Re: session

2005-08-16 Thread Shahmat Dahlan
as for for lifetime, url and host. Regards and thank again. Shahmat Dahlan wrote: In my php.ini I've enabled session.use_cookies=1 Everytime I initialize a session, it create the session storage file in my /tmp At the top my script, I've added session_start (); In my test login function

Re: [PHP-DB] Re: MySQL Connect using Dreamweaver

2005-10-13 Thread Shahmat Dahlan
Correct me if I'm wrong, but if I'm not mistaken Mysql 5 will not work in Dreamweaver. It will only work if you have 4.x (can't remember the exact version) Even if you have installed Mysql 4.x, u must make sure you add in old_password at the last line of the my.cnf If not, you can always

Re: [PHP-DB] Remove MySQL Server

2005-10-21 Thread Shahmat Dahlan
You can also run this, that is if you haven't manually removed your mysql installation directory c:\mysqld --remove service name ,where service name is usually MySQL Unnawut Leepaisalsuwanna wrote: 1. Run Regedit or regedt32. 2. Find the registry entry:

Re: [PHP-DB] Detailed Report

2005-10-27 Thread Shahmat Dahlan
| A36 | London Providers | Mark | B67 | Madrid And I need the report in the following format: Customers John - A36 - New York Jason - B45 - Los Angeles Max - A36 - Paris Providers John - A36 - London Mark - B67 - Madrid Any one can help? I´m a bit stalled thx regards. -- Best Regards, Shahmat

[Fwd: Re: [PHP-DB] Re: SELECT html table]

2005-12-04 Thread Shahmat Dahlan
-- Best Regards, Shahmat Dahlan Research and Development SAINS Mobile: +(60)16 882 6130 Office: +(60)82 426 733 ext 5512 ---BeginMessage--- (1) i've been using this method for years now, maybe somebody else has a better way to do this? ? sql query $i = 0; while (sql result fetches

Re: [PHP-DB] Minor Change

2005-12-12 Thread Shahmat Dahlan
did it say which line does the error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in is referring to. if it is referring to the line which contains the function call mysql_query (), dpirago is right, there could be some mistake in the sql statement.