Re: [PHP-DB] Formatting in Text Area

2008-02-02 Thread bedul
i'm just add Tobias script.

put rtrim and ltrim to have a better result.


- Original Message -
From: Tobias Franzén [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, February 01, 2008 10:24 PM
Subject: Re: [PHP-DB] Formatting in Text Area


 Hi Patricia,

 You can impose width restrictions on the textarea field
and forcefully
 wrap lines longer than the desired length afterwards (if
you save it,
 save it as-is for better portability). To wrap text with
PHP when you
 print it, or want to send the e-mail, there is a function
called
 wordwrap(). Be sure to split the string at every line
break though.

 Using white-spaces for formating will only work if your
output of the
 text is with a fixed-width font. The pre html tag will
do this for
 you, but it won't look pretty. Use CSS to style it is my
advise.

 Something to bear in mind with regards to e-mail is that
the standard
 line width is 72 characters if I remember correctly.

 Comparison of fixed-width fonts
 http://www.cfcl.com/vlb/h/fontmono.html

 Example code (not tested, so I'm not sure it will run
as-is):
 ?php
 $text = $_POST[textareainput];
 $long_lines = split(\n, $text);
 $split_text = ;
 $width = 72;
 foreach ($long_lines as $oneline) {
$split_text = $split_text . wordwrap($oneline, $width,
\n) . \n;
 }
 // $split_text will have one more newline at the end than
what you
 started with, so let's clean it up
 $split_text = substr($split_text, 0, -1);
 echo pre . $split_text . /pre;
 // or
 echo nl2br($split_text);
 ?

 /Tobias

 VanBuskirk, Patricia wrote:
  Sorry, I had sent this first to my FileMaker list, but
then realized it
  was probably more html/php related than database
related.  FMP is for
  FileMaker Pro.
 
  Can you give me an example of your suggestion?  I am
still quite new at
  php and learn much better by example.
 
  Thanks Evert!
 
  Trish
 
  -Original Message-
  From: Evert Lammerts [mailto:[EMAIL PROTECTED]
  Sent: Friday, February 01, 2008 8:21 AM
  To: VanBuskirk, Patricia
  Cc: php-db@lists.php.net
  Subject: Re: [PHP-DB] Formatting in Text Area
 
  VanBuskirk, Patricia wrote:
 
  I have a customer description text area field on my
form which feeds
 
  through php to FMP,
  What's FMP? Is that what links this email to the
db-list?
 
   and spits out a confirmation page and email.  The
issue I am having
 
  is this ... as the customer types, the text wraps.  Many
put their own
  hard returns and spaces in to organize their
description.  It seems I
  can't get it to do both the wrap and show the actual
formatting entered.
  If I format the field as physical wrap, the lines run
off the page on
  the confirmation/printout.  If I format it as virtual,
then the hard
  returns, etc get lost.  I have also tried using PRE on
the
  confirmation page and email and that doesn't work
either.
 
 
 
  Line wrapping in a text area is a property of the text
area, not of the
  text, as opposite to line breaks and hard returns. This
is why you won't
 
  find line break characters at the place the text used to
wrap in the
  text area.
 
  What you can do of course is to add a div (or whatever
container you
  feel like) of the same width / height as the text area
to the
  confirmation page and replace \l\r with br 's.
 
 

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


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



Re: [PHP-DB] PHP MySQL Issue!

2007-07-12 Thread bedul

- Original Message - 
From: Austin C [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, July 13, 2007 8:41 AM
Subject: [PHP-DB] PHP  MySQL Issue!


 Hello everyone, im trying to use PHP to create 2 tables in a database and
 populate them with tables, however, it just wont work. Here is my full code:
 
 
 ?php
 $hostname = $_GET['hostname'];
 $dbname = $_GET['dbname'];
 $dbusername = $_GET['dbusername'];
 $dbpassword = $_GET['dbpassword'];
 $dbprefix = $_GET['dbprefix'];
 
 echo centerbrbInstall- Processing Database Info . . . . ./b
 p
 p;
 
 $cxn = mysqli_connect($hostname,$dbusername,$dbpassword,$dbname)
or die (Basic Library System could not connect to the database you
 specified. Please go back and make sure the information you submitted is
 correct.);
 
 $file = '../config.php';
 
 $fh = fopen($file, 'w') or die('Failed to open config.php file');
 
 fwrite($fh, '?php $hostname='.$hostname.';
 $dbname='.$dbname.';
 $dbusername='.$dbusername.';
 $dbpassword='.$dbpassword.';
 $dbprefix='.$dbprefix.'; ?') or die('Could not write to config.php');
 
 fclose($fh);
 
 mysqli_select_db($cxn,$dbname)

are this should be
mysqli_select_db($dbname, $cxn) ???
and the rest seem miss place in the function


   or die (Could not connect to the database you specified. Please go
 back and make sure you entered the correct database.);
 
 mysqli_select_db($cxn,$dbname);
 $sql = CREATE TABLE .$dbprefix._circulation
 (
 title varchar(100),
 author varchar(100),
 pubdate varchar(100),
 genre varchar(100),
 medium varchar(100),
 price varchar(100),
 id int(20) NOT NULL AUTO_INCREMENT,
 PRIMARY KEY(id)
 );
 
 mysqli_select_db($cxn,$dbname);
 $sql = CREATE TABLE .$dbprefix._holder
 (
 space varchar(100)
 );
 
 $query = mysqli_query($cxn,$sql);
 if(!$query){
 echo Basic Library System was unable to submit the information to the
 database. Please make sure you specified correct information.;
 }else{
 echo Successfully created table. Do something here;
 }
 
 mysqli_close($cxn);
 ?
 
 
 
 --
 
 Visit galacticwebdesigns.com for tutorials and more!
 


Re: [PHP-DB] IN clause

2007-06-26 Thread bedul
u can use array

put all your data into array.. example below


while($tmp=mysql_fetch_array($res)){
$myData[$tmp[0]]=$tmp[1];

}

ksort($myData);

foreach($myData as $nm=$val){
//put your script here..

}
- Original Message -
From: Bryan [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Tuesday, June 26, 2007 8:01 PM
Subject: [PHP-DB] IN clause


 If I have a SQL statement using the IN clause, how do I
keep the order
 of the list?

 Example:
 SELECT * FROM table WHERE (number in (5, 9, 3, 4, 1, 7, 2,
8, 6))

 How would I pull records in the order of the numbers to
list out as:
 5 - Record 5
 9 - Record 9
 3 - Record 3
 4 - Record 4
 1 - Record 1
 7 - Record 7
 2 - Record 2
 8 - Record 8
 6 - Record 6

 Thanks so much...

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


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



Re: [PHP-DB] how to delete

2007-06-19 Thread bedul
unlink
(PHP 3, PHP 4, PHP 5)

unlink -- Deletes a file
Description
bool unlink ( string filename [, resource context] )


Deletes filename. Similar to the Unix C unlink() function.
Returns TRUE on success or FALSE on failure.

  : As of PHP 5.0.0 unlink() can also be used with some
URL wrappers. Refer to  M for a listing of which
wrappers support unlink().

  : Context support was added with PHP 5.0.0. For a
description of contexts, refer to   CL, Stream
Functions.

See also rmdir() for removing directories.


tes it out...

instead using CAPITAL.. u can use this text mean bold (use
 )
- Original Message -
From: Asim [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Tuesday, June 19, 2007 12:08 PM
Subject: [PHP-DB] how to delete


 HI

   can you tell me how to delete images from HARD DISK OR
WEB SPACE by using php?

   i have created tumbnails of some images and they are
stored on HARD DISK IN PRESCRIBED FOLDER. now i use

DESTROYIMAGE();

   FUNCTION in php but it didnot delete crearted thumbnails
of prescribed folder. i am doing this to save webspace.

   moreover, is there any way to create THUMBNAILS WITHOUT
SAVING IMAGES WITH NEW SIZE ON HARD DISK?


   BYE


 Asim Jamil  - 0092 345 4025907, Pakistan

 -
 Yahoo! oneSearch: Finally,  mobile search that gives
answers, not web links.

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



Re: [PHP-DB] Connection error!

2007-06-19 Thread bedul
what is your server php ip.. i created an example:
10.30.11.6
and your mysql server 10.30.11.7

what u should do was.. created an user that use server
10.30.11.6 and then reload it.

try connect using the user u create but remember the host
was 10.30.11.7

hope u understand.
- Original Message -
From: Chris [EMAIL PROTECTED]
To: MIGUEL ANTONIO GUIRAO AGUILERA
[EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Tuesday, June 19, 2007 7:45 AM
Subject: Re: [PHP-DB] Connection error!


 MIGUEL ANTONIO GUIRAO AGUILERA wrote:
 
  Hi all,
 
  I'm getting this error message Client does not support
authentication protocol requested by server, consider
upgrading MySQL client when I try to connect to the DB
server!
 
  Any ideas?

 Did you search for this error message ?

 The first result is this page:

 http://dev.mysql.com/doc/refman/5.0/en/old-client.html

 Which explains what you have to do and how to fix it.

 --
 Postgresql  php tutorials
 http://www.designmagick.com/

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


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



Re: [PHP-DB] Multiple prepared statements and preparing a stored procedure...

2007-06-05 Thread bedul
nope!!
unless u build 2 class.. that's for save actualy..

$db1 = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB);
$db2 = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB);

- Original Message -
From: Ken Keefe [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Wednesday, June 06, 2007 1:14 AM
Subject: [PHP-DB] Multiple prepared statements and preparing a stored
procedure...


 Is it possible to have multiple prepared statements associated with a
 single mysqli object at one time?

 For example:

 $db = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB);
 $query1 = $db-prepare($sql1);
 $query2 = $db-prepare($sql2);
 foreach ($arr as $key = $val)
 if($val)
 {
 $query1-bind_param(s, $key);
 $query1-execute();
 }
 else
 {
 $query2-bind_param(s, $key);
 $query2-execute();
 }
 $query1-close();
 $query2-close();


 Also, is there any benefit to using a prepared statement to call a
 stored procedure? If so, how do I prepare another statement after the
 stored procedure? I keep getting an error about being out of sync...

 Thanks,
 Ken

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


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



[PHP-DB] Re: [PHP-WIN] Bug??? Duplicate entry '255' for key 1 on auto increment

2007-05-22 Thread bedul
$query = CREATE TABLE $table_name (
rowID INT(11)   NOT NULL AUTO_INCREMENT,
category VARCHAR(25) NOT NULL,
trans_type VARCHAR(8) NOT NULL,
PRIMARY KEY (rowID));

try above.. thx to dale
- Original Message -
From: Dale Attree [EMAIL PROTECTED]
To: 'Mark Abrams' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, May 22, 2007 11:59 AM
Subject: RE: [PHP-WIN] Bug??? Duplicate entry '255' for key 1  on auto
increment


 Set the length of rowID to 11, leave type as INT.

 -Original Message-
 From: Mark Abrams [mailto:[EMAIL PROTECTED]
 Sent: 22 May 2007 06:52 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-WIN] Bug??? Duplicate entry '255' for key 1  on auto
 increment

 Hi All,

 I have a table problem with Duplicate entry '255' for key 1  when any of
 my auto increment rowID fields reaches 255

 I have installed PHP Version 5.1.2 and mySQL 5.0.11-beta on Win XP Pro.

 Each table in my DB that uses an auto increment for rowID fails at the
255th

 record insert.
 I have redefined the field: TINYINT, INT, VARCHAR, ...  Same problem on
 several files.  They all work OK until I hit #255

 Is this a bug? Have I defined my table improperly? Is there a fix?

 TIA,
 Mark

 Here is my table defn:
 $query = CREATE TABLE $table_name (
 rowID INT UNSIGNED NOT NULL AUTO_INCREMENT,
 category VARCHAR(25) NOT NULL,
 trans_type VARCHAR(8) NOT NULL,
 PRIMARY KEY (rowID));

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








***
 The information contained in this e-mail is confidential and may be
subject to legal privilege.
 Access to this e-mail by anyone other than the intended recipient is
unauthorised.

 If you are not the intended recipient you must not use, copy, distribute
or disclose the e-mail or any part of its contents or take any action in
reliance on it. If you have received this e-mail in error, please notify us
immediately by e-mail ([EMAIL PROTECTED]) or telephone (+27
11 265 4200).
 This message is free of all known viruses. It has been screened for
viruses by Blockmail.


***

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


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



[PHP-DB] Re: [PHP-WIN] Dynamically update mysql field

2007-05-21 Thread bedul
u mean like this??
?

// $id=mysql_result($result,$i,ID);

while($temp = mysql_fetch_array($result)){
  foreach($temp as $varNm =$varVal){
$$varNm =$varVal;

}
/*
put your table code here
*/

}


?

SOry just gues!

- Original Message -
From: sam rumaizan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 21, 2007 3:24 PM
Subject: [PHP-WIN] Dynamically update mysql field


 I have Textarea generated by while loop. How can I name it to be able to
use it with my mysql update statement? Scroll down to see it


   while($i$num)
   {
 // collect all Information
 $id=mysql_result($result,$i,ID);
 $RefNo=mysql_result($result,$i,Ref_No);
 $JobTitle=mysql_result($result,$i,Job_Title);
 $Category=mysql_result($result,$i,Category);
 $AssignEngineer=mysql_result($result,$i,Assign_Engineer);
 $DateReceived=mysql_result($result,$i,Date_Received);
 $DateRequired=mysql_result($result,$i,Date_Required);
 $DateAssigned=mysql_result($result,$i,Date_Assigned);

$ProjectedCompletionDate=mysql_result($result,$i,ProjectedCompletionDate);
 $DateCompleted=mysql_result($result,$i,Date_Completed);
 $ManhourSpent=mysql_result($result,$i,ManhourSpent);
 $Status=mysql_result($result,$i,Status);

   ?

   TBODY
 TR VALIGN=TOP ALIGN=CENTER
TD? echo $id ?/TD
 TD? echo $RefNo ?/TD

   TD PTEXTAREA NAME=text  ROWS=10
 COLS=40? echo $JobTitle?/TEXTAREA

   BRINPUT TYPE=submit
 VALUE=Update
   INPUT type=reset/P/TD
 TD? echo $Category ?/TD
 TD? echo $AssignEngineer ?/TD
 TD? echo $DateReceived ?/TD
TD? echo $DateRequired ?/TD
 TD? echo $DateAssigned ?/TD
 TD? echo $ProjectedCompletionDate ?/TD
 TD? echo $DateCompleted ?/TD
 TD? echo $ManhourSpent ?/TD
 TD? echo $Status ?/TD
 /TR
 /TBODY


 ?
  ++$i;
}
}







 -
 Need a vacation? Get great deals to amazing places on Yahoo! Travel.

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



Re: [PHP-DB] $_POST[mypassword]; ***Undefined index: mypassword

2007-05-15 Thread bedul
it seem the poster already have the answer..
what he/she going to do was how to save username and pass on session.

thx for your help
- Original Message -
From: Chris [EMAIL PROTECTED]
To: bedul [EMAIL PROTECTED]
Cc: Chetanji [EMAIL PROTECTED]; php-db@lists.php.net
Sent: Tuesday, May 15, 2007 11:49 AM
Subject: Re: [PHP-DB] $_POST[mypassword]; ***Undefined index: mypassword


 [ taking php-windows out again :P ]

 bedul wrote:
  the problem is right here (said on error msg):
  session_register(myusername); session_register(mypassword);
 
  u should use session_register(myusername) after declare the name.
  i taken from my php chm
 
  It is currently impossible to register resource variables in a session.
For example, you cannot create a connection to a database and store the
connection id as a session variable and expect the connection to still be
valid the next time the session is restored. PHP functions that return a
resource are identified by having a return type of resource in their
function definition. A list of functions that return resources are available
in the resource types appendix.
 
  if you understand what statement above.. conguration, if not.. don't
shock.. me either.

 You can't store database connections in a session.

 Ie you can't:

 $connection = mysql_connect();

 $_SESSION['DbConnection'] = $connection;


 because the HTTP protocol (and thus PHP) is stateless - you don't know
 where the next connection is coming from or even if there is another
 connection coming.

 If there is another HTTP request, you have no way of linking request '1'
 (where the database connection was set up) to request '47' in the chain.

 --
 Postgresql  php tutorials
 http://www.designmagick.com/

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



Re: [PHP-DB] [PHP] Cannot connect to an MySQL database using Named Pipes

2007-05-15 Thread bedul
try run winmysqladmin.exe
is there a posibility your mysql server got crash with unknown reason
- Original Message -
From: John Comerford [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Wednesday, May 16, 2007 11:05 AM
Subject: [PHP-DB] [PHP] Cannot connect to an MySQL database using Named
Pipes


 Hi Folks,

 I have a MySQL database running on Windows XP, that I want to disable
 network  connections to and enable 'named pipes'.  I am running MySQL
 5.0.27 and my.ini looks like...

 [client]
 #password= your_password
 port= 3306
 socket= /tmp/mysql.sock

 [mysqld]
 #port= 3306
 socket= /tmp/mysql.sock
 #Allow connections via named pipes (Windows NT+ only). Note: you can
 specify a pipe name on the advanced network page, if required.
 enable-named-pipe
 #Don't allow connections via TCP/IP.
 skip-networking



 I can connect to the DB using the MySQL GUI tools if I set my pipe name
 to '/tmp/mysql.sock' using the login dialog box.
 However when I try and connect using PHP I get an error.  I have tried
 several variants of the connect command and I get various errors but all
 are along the lines of:
 Unknown MySQL server host '/tmp/mysql.sock' (11004)  or
 Can't connect to MySQL server on 'localhost' (10061)

 I have tried
 $mysqli = new mysqli(null, $username,$password, $database);
 $mysqli = new mysqli(localhost:/tmp/mysql.sock, $username,$password,
 $database);
 $mysqli = new mysqli(localhost, $username,$password,
 $database,3306,/tmp/mysql.sock);
 $mysqli = new mysqli(localhost, $username,$password,
 $database,/tmp/mysql.sock);
 $mysqli = new mysqli(/tmp/mysql.sock, $username,$password, $database);
?
$mysqli = new mysqli(localhost, my_user, my_password, world);

/* check connection */
if (mysqli_connect_errno()) {
printf(Connect failed: %s\n, mysqli_connect_error());
//exit();
}

printf(Host information: %s\n, $mysqli-host_info);

/* close connection */
$mysqli-close();
?

can u try above.. I got bad felling bout this??


 I have also tried the above commands using mysqli_connect ?  I have done
 a few searches of the web but seem to always come up with something like
 the above?  Anybody have any ideas why it won't connect in PHP ?

 TIA,
 JC

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


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



Re: [PHP-DB] $_POST[mypassword]; ***Undefined index: mypassword

2007-05-14 Thread bedul
the problem is right here (said on error msg):
session_register(myusername); session_register(mypassword);

u should use session_register(myusername) after declare the name.
i taken from my php chm

It is currently impossible to register resource variables in a session. For 
example, you cannot create a connection to a database and store the connection 
id as a session variable and expect the connection to still be valid the next 
time the session is restored. PHP functions that return a resource are 
identified by having a return type of resource in their function definition. A 
list of functions that return resources are available in the resource types 
appendix.

if you understand what statement above.. conguration, if not.. don't shock.. me 
either.

for phpWin.. this topic perhaps easy for you to answer. 


Re: [PHP-DB] PHP to md5 the $var before it reaches MySQL's gen query log

2007-05-12 Thread bedul
username BLOB NOT NULL default '',
password BLOB NOT NULL default '',

do you try
username varchar 50,
password varchar 50??

i'm just ask..
sry, hope that's can solve your problem

- Original Message -
From: Chetan Graham [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, May 12, 2007 4:28 PM
Subject: [PHP-DB] PHP to md5 the $var before it reaches MySQL's gen query
log


 Greetings to All,
 I am having difficulty in 'md5'ing a $var in a function before it is
 placed into the (INSERT INTO table...

 The whole point is I don't want the MySQL DB logs showing my $var's
 password and username 'before' it is encrypted by MySQL's md5.

 When MySQL receives PHP's encrypted $var the log shows query INSERT with
 the 32 bits but it is not inserted into the DB.

 MySQL will not accept the $var's in the code that is commented out.
 It shows no errors by the way.
 MySQL accepts what is shown, but this is not as I explained what I want.
 Thanks In Advance,
 Chetan

  mysql_query(CREATE TABLE IF NOT EXISTS docproedit (
   id int(11) NOT NULL auto_increment,
   username BLOB NOT NULL default '',
   password BLOB NOT NULL default '',
   TimeEnter timestamp,
   PRIMARY KEY (id)
)
   ENGINE=MyISAM;)or die('Create Died' . mysql_error());


 ?php
 $db_server='localhost';
 $db_user='root';
 $db_pass='somepassword';
 $db_name='aims site';
 $tbl_name='docproedit';
 $con = mysql_connect($db_server,$db_user,$db_pass) or die(mysql_error());
 $q=mysql_select_db($db_name, $con) or die(mysql_error());

 function addNewUser($username,$password){
 global $q;
 global $tbl_name;
 global $con;
 //$user=md5($username);
 //$pass=md5($password);
 //mysql_query(INSERT INTO $tbl_name
 (username,password)VALUES('$user'),('$pass'));
 $user=$username;
 $pass=$password;
 mysql_query(INSERT INTO $tbl_name
 (username,password)VALUES(md5('$user'),md5('$pass')));
 return mysql_query($q,$con);
 }
 ?
 ?php
 $username=somename;
 $password=somepassword;

 addNewUser($username,$password);
 echo h2New User Added!/h2;
 ?

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


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



Re: [PHP-DB] RE: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'? [SOLVED]

2007-05-11 Thread bedul
i'm currious about how goggle logic to find product..
that's something to thinking of
- Original Message -
From: Daevid Vincent [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, May 11, 2007 11:50 AM
Subject: [PHP-DB] RE: How do I find products when a user types freeform
strings like 'Sony 20 TV' or '20 Sony TV'? [SOLVED]


  -Original Message-
  From: Daevid Vincent [mailto:[EMAIL PROTECTED]
  Sent: Friday, May 04, 2007 1:22 AM
  To: [EMAIL PROTECTED]
  Subject: How do I find products when a user types freeform
  strings like 'Sony 20 TV' or '20 Sony TV'?
 
  I'm having trouble figuring out the logic/query I want.
  I know that all those ORs are not right.
  I'm doing this in PHP and mySQL (of course),
  so if it can't be done with a single query, I can split it up.
 
  Here's the challenge, given a text field search box, someone enters:
 
  Sony 20 TV
 
  How do I search for that, not knowing which fields are which?
  For example, they could have also entered:
 
  20 Sony TV
 
  This is the one I have now, but (as you probably noticed), it
  will return many rows,
  I expect that most of the time  1 row will be returned, but
  I'm getting a grip more than I want (or the customer would want), and
  also rows that have nothing to do with the search terms.
 
  SELECT products.*, companies.name AS company_name,
  categories.name AS category_name
  FROM products
  LEFT JOIN companies ON company_id = companies.id
  LEFT JOIN categories ON category_id = categories.id
  WHERE  products.enabled = 1
  AND(
  (products.model LIKE 'sony%'   OR products.model
  LIKE '20%'  OR products.model LIKE 'tv%')
  OR (products.upc LIKE 'sony'  OR products.upc LIKE
  '20' OR products.upc LIKE 'tv')
  OR (products.name LIKE '%sony%'   OR products.name
  LIKE '20%'   OR products.name LIKE '%tv%')
  OR (companies.name LIKE 'sony%'   OR companies.name
  LIKE '20%'  OR companies.name LIKE 'tv%')
  OR (categories.name LIKE '%sony%' OR categories.name
  LIKE '20%' OR categories.name LIKE '%tv%')
  )
  ORDER BY categories.name DESC, products.name ASC, companies.name ASC;
 
  (and that just gets uglier the more words in the search)
 
  ++--+--+--+---
  +
  | id | name | model| company_name |
  category_name |
  ++--+--+--+---
  +
  |  1 | 20 TV   | STV20-KVR-HD | Sony | Tube
  | ---
  |  2 | 36 TV   | STV36-KVR-HD | Sony | Tube
  |
  |  4 | Ultra-Plasma 62 | UP62F900 | Sony |
  Plasma|
  |  5 | Value Plasma 38 | VPR542_38| Sony |
  Plasma|
  |  6 | Power-MP3 5gb| 09834wuw34   | Sony | MP3
  Players   |
  |  3 | Super-LCD 42| SLCD42hd002  | Sony | LCD
  |
  |  7 | Super-Player 1gb | SP1gb| Sony | Flash
  |
  |  8 | Porta CD | pcd500   | Sony | CD
  Players|
  ..
  ++--+--+--+---
  +
 
  Obviously the person wanted id = 1 in this case.
 
  Unrelated, is there any speed improvement using JOIN instead
  of LEFT JOIN ?
  Think millions of products.
 
  Thanks for help and suggestions...
 
  Daevid.

 I'll attach a .php file, but this list server may strip it off, so I'll
also paste it below, sorry for any formatting issues in
 advance...

 ?php
 if ($_POST['keywords'])
 {
 $_POST['keywords'] = stripslashes($_POST['keywords']);
 $words = preg_split(/\s+/,$_POST['keywords'], -1, PREG_SPLIT_NO_EMPTY);
 }

 $sql = 'SELECT products.* FROM product_table WHERE 1 ';
 $sql .= keyword_filter($words, array('products.model%', 'products.upc',
'%products.name%', 'companies.name%', '%categories.name%'),
 true);
 $sth = SQL_QUERY($sql);

 /**
 * Builds the WHERE portion of a SQL statement using the keywords in
various columns with wildcard support.
 *
 * @return string SQL statement fragment
 * @param mixed $words either a string of words space deliminated or an
array of words
 * @param array $columns an array of table.column names to search the
$words in. Use % as a wildcard for example pass in
 'username%' or '%username%'.
 * @param boolean $and (true) whether the words have to be ANDed or ORed
together.
 * @author Daevid Vincent [EMAIL PROTECTED]
 * @since 1.0
 * @version 1.4
 * @date05/10/07
 * @todo This should handle +, - and  just like google or yahoo or other
search engines do.
 */
 function keyword_filter($words, $columns, $and = true)
 {
 // this maybe useful
 //
http://wiki.ittoolbox.com/index.php/Code:Translate_Boolean_Query_to_SQL_sele
ct_statement
 // http://www.ibiblio.org/adriane/queries/
 //
http://www.zend.com/zend/tut/tutorial-ferrara1.php?article=tutorial-ferrara1
kind=tid=8238open=1anc=0view=1

 //
http://evolt.org/article/Boolean_Fulltext_Searching_with_PHP_and_MySQL/18/15
665/index.html
 // 

Re: [PHP-DB] Is there something similar to this out there?

2007-05-11 Thread bedul
u using echo on your script.. that's not wise
i suggest u save all your type on a var like $txt

and in the end of line u print it

that will save your work..

your problem was how to make CREATE?
it hard since i kinda bussy.. but hope i can help u..


- Original Message -
From: rieh25 [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, May 12, 2007 9:52 AM
Subject: [PHP-DB] Is there something similar to this out there?



 I'm working on a script to create back-up's of a database. It's not
complete
 because it only generates the insert into commands, it doesn't generate
 the create database or create table ones, but I wondered if there is
 another way to create a back-up's of a database that can only be accessed
 through the web.

 Script (replace '[' and ']'):

 [?php
 $link = mysql_connect(127.0.0.1,root,password);
 $bd = my_database;
 $result = mysql_listtables ($bd);
 $i = 0;
 while ($i [ mysql_num_rows ($result)) {
   $tb_names[$i] = mysql_tablename ($result, $i);
   $result_fields = mysql_db_query($bd, desc .$tb_names[$i]);
   $j = 0;
   $campos = array();
   $tipos = array();
   while ($field = mysql_fetch_array($result_fields)){
 $campos[$j] = $field[Field];
 $tipos[$j++] = $field[Type];
   }
   mysql_free_result($result_fields);
   $result_query = mysql_db_query($bd, select * from .$tb_names[$i]);
   if (mysql_num_rows($result_query) ] 0){
 echo DELETE * FROM .$tb_names[$i] .[br];
 echo COMMIT;[br];
 echo INSERT INTO .$tb_names[$i] .(;
 echo join(, , $campos).) VALUES[br];
 $l = 0;
 $lineas = array();
 while ($datos = mysql_fetch_array($result_query)){
   $k = 0;
   $linea = array();
   while ($k [ $j){
 if (is_null($datos[$k])){
   $linea[$k] = NULL;
 } else {
   $linea[$k] =
 ''.str_replace(chr(13).chr(10),\\r\\n,$datos[$k]).'';
 }
 $k++;
   }
   $lineas[$l++] = (.join(, , $linea).);
 }
 echo join(,[br], $lineas).;[br]COMMIT;[br][br];
   }
   $i++;
   mysql_free_result($result_query);
 }
 mysql_close($link);
 ?]
 --
 View this message in context:
http://www.nabble.com/Is-there-something-similar-to-this-out-there--tf373052
1.html#a10442248
 Sent from the Php - Database mailing list archive at Nabble.com.

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


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



[PHP-DB] Re: [PHP-WIN] Problem With Pear::DB

2007-05-10 Thread bedul
how about IP from the PHP server not the SQL server. hmm it happen to me
using mysql, i just wanna share hope help you

my mysql server 10.30.11.6 and my comp ip was 10.30.11.136
in mysql server i create account/user which the server not localhost but
10.30.11.136 and it worked..

i send to phpDB.. if there any result (reply).. i send to you
- Original Message -
From: Jody Williams [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2007 10:36 PM
Subject: Re: [PHP-WIN] Problem With Pear::DB


 THat is what I thought.  Just to confirm, I created an ODBC connection
 for the Windows 2k3 server to the Database using the Server name.  I
 tried the IP in the PHP file and have the same results.

 Is there some kind of restriction that might be in place in Windows 2003?

 Jody

 On 5/9/07, Stut [EMAIL PROTECTED] wrote:
  Jody Williams wrote:
   I have a situation where I am unable to connect to a Microsoft SQL
   2005 Database from Windows Server 2003 (IIS + PHP 5.0.4).
  
   here is the code:
   ?php
   require_once 'DB.php';
   $dsn = mssql://aspj_transfer:[EMAIL PROTECTED]/transfer_station;
   $db = DB::connect($dsn);
   if (DB::isError($db))
   {
   die ($db-getMessage().'br'.$db-getUserInfo());
   }
   // no useful info.  just trying to return something.
   $query = select [name] as n from sysobjects order by [name];
   $data = $db-query($query);
   while ($row = $data-fetchRow())
   {
   echo $row[0].br;
   }
   $db-disconnect();
   ?
  
   Here is the error:
  
   [DB Error: connect failed] **
   mssql://aspj_transfer:[EMAIL PROTECTED]/transfer_station
  
From my workstation, this can connect just fine (Windows XP, IIS, PHP
   5.0.4).
  
   There aren't any firewalls between the machines.
  
   Any suggestions?
 
  Can the server you're running this on resolve eggrs006 to an IP address?
   If not, that's your problem. If it can then you need to check the SQL
  server user to make sure it can access that database from that machine.
 
  Note that it is very very very unlikely that this problem is anything to
  do with PHP or Pear::DB.
 
  -Stut
 

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


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



Re: [PHP-DB] Re: Read more link with HTML code

2007-05-08 Thread bedul
i prefer u use the prefix.. but it very advance..

can u spesific more.. client able to type what tag (u must consider lock
other than what u type earlier)
anyway.. using a table is a good idea.. actualy if your client type using
table.. what should u do??
- Original Message -
From: itoctopus [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Tuesday, May 08, 2007 7:26 AM
Subject: [PHP-DB] Re: Read more link with HTML code


 Put your 200 characters in a table block:
 table
 tr
 td
 Your 200 characters
 /td
 /tr
 /table

 --
 itoctopus - http://www.itoctopus.com
 Mike van Hoof [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hello list,
 
  I got a problem with displaying content in a read more block which
  contains HTML code.
  The problem is as followes:
 
  I got a large piece of content, which contains HTML code (bui
etc),
  but after 200 characters a read more link appears. At the moment I strip
  al the HTML out of this piece of content, and display the full set off
  content on another page.
  But now i also want to display the bold text etc. in the first (200
chrs)
  content block. The only problem i have here, is that when I got a bold
tag
  opend in the first 200 chrs, and it's closed after 400 chrs, then the
rest
  off the page is also bold.
 
  somebody got a solution ?
 
  Thanks for reading.
 
  Mike
 
  --
  Medusa, Media Usage Advice B.V.
  Science Park Eindhoven 5216
  5692 EG SON
  tel: 040-24 57 024  fax: 040-29 63 567
  url: www.medusa.nl
  mail: [EMAIL PROTECTED]
 
  Uw bedrijf voor Multimedia op Maat


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


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



[PHP-DB] Re: [PHP-WIN] automatic-click flash?

2007-05-06 Thread bedul
nope.. that's can be dangerous
since some activeX today are a food for a worm..

be safe on NET
- Original Message -
From: Gustav Wiberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2007 4:06 PM
Subject: [PHP-WIN] automatic-click flash?


Hi there!

I searched the Internet about Click to activate this control... Why it is
viewd in IE...

Q. Why do I see Click to activate this control.?
Microsoft® changed the way ActiveX controls behave so Dynamic HTML (DHTML)
events related to user interaction, such as onblur and onclick, are
automatically blocked. To activate an interactive control, either click it
or use the TAB key to set focus on it and then press the SPACEBAR or the
ENTER key. Interactive controls loaded from external script files
immediately respond to user interaction and do not need to be activated.

Basically, you now need to click the control to approve it before the
Flash and navigation buttons will work.

and after this reading,... I've been thinking.


Is it possible to make an automatic click in Javascript to an embedded
flash-object?



/Gustav


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

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



[PHP-DB] [sory] Re: [PHP-DB] Re: [PHP-WIN] automatic-click flash?

2007-05-06 Thread bedul
sory.. that's pure my fault.. i should type for php-win
my mail setting are always to send to php-db

that's wont happen again
 
  Why do you keep cc'ing the php-db list with responses that have nothing 
 to do with the list?
 
 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/

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



Re: [PHP-DB] Problem with imagebuilding

2007-05-04 Thread bedul
  $hintergrund = $row_hintergrundsbild-Bildname;
  $backgroundimage = $hintergrund;

this is the problem whole about. u call img name but not img file..
fyi.. to build a img u must begin with this..
$im = imagecreatefrompng(test.png);

what u want to do??
plz explain
- Original Message -
From: Ruprecht Helms [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, May 04, 2007 3:10 PM
Subject: [PHP-DB] Problem with imagebuilding


 Hi,

 I actually have a problem with a script that creates a picture from
 database content. I the following error:


 Warning: imagepng(): supplied argument is not a valid Image resource in
 /opt/lampp/htdocs/cycosmos_2/avatare/avatarbild.php on line 315

 The other lines that copy and resize other content for the imagebuilding
 I've remarked, because there produce errors too.

 Another script that produce the result that I want by working with
 hardcoded content works without no problems.


 Can someone tell me what can be wrong in the databasescript.


 The file  avatarbild.php contails the malefunction script.
 The file bild_komplettavatar.php contains an example with the correct
 output.

 Regards,
 Ruprecht

 ---
 Ruprecht Helms IT-Service  Softwaredevelopment
   allow your worktools be individual

 Web: http://www.rheyn.de







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

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



Re: [PHP-DB] DB Design Concepts

2007-05-02 Thread bedul
actualy i'm not soo smart..
 Max Thayer wrote:
  I'm using MySQL 5.x InnoDB engine, transactional tables.  I have a
  conceptual design question.  If I have a two columns 'a' and 'b', a is
  the primary key, and b is a type double, in table 1 (T1) for which
  column b will have many NULL values, do I leave it with an allow null
  constraint on the column or pull the column and place it into table 2
  (T2) with a foreign key, making a simple optional one-to-one
  relationship.  Over the course of time, as the table fills with records,
  will a column w/ many NULL values have a detrimental effect on
  performance or maintenance with regards to the DB?  Am I missing
  something here in DB design 101, by leaving the column in the T1 and
  knowing it will only be populated 7% of the time; what are the major
  implications based on the RDBMS and engine I'm using?
can we see your table??
u can use my way for your problem. if you have access.. the lowest is fine.
I create the table from there and then i use relationship.

 What kind of queries are you going to be running? Where you need both
 columns all the time?
i ask same things.. hope my zip can help u

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

Re: [PHP-DB] php mysqli error

2007-04-30 Thread bedul

- Original Message -
From: Josh Diakun [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Monday, April 30, 2007 5:42 PM
Subject: [PHP-DB] php mysqli error


 Hello,

 I have had an issue for the past week or so that I cannot find a decent
 explanation for.  I am receiving the following warning when using mysqli
 to insert a bunch of records into a database...

 *Warning*: mysqli_stmt_bind_param() [function.mysqli-stmt-bind-param
 http://localhost/function.mysqli-stmt-bind-param]: Number of variables
 doesn't match number of parameters in prepared statement in *c:\program
 files\apache group\Apache\htdocs\prepared.php* on line *21

plzzz help us out
when u said problem.. plz include with the source where the code was problem
occurs. anyway.. i'm not using mysqli and hope other might help u.

i believe u misstype on the variable.. perhaps u should type the source to
find the answer.

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



Re: [PHP-DB] error logging MySQL syntax errors?

2007-04-27 Thread bedul
plz remind to send to us your aplication.. the problem may cause from your
sintax don't match the version
- Original Message -
From: Tim McGeary [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, April 28, 2007 12:15 AM
Subject: [PHP-DB] error logging MySQL syntax errors?


 I am getting semi-ambiguous messages in the browser like:

  You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near '' at line 4

 Is there a way in my PHP script to turn on a logging that is more
 specific about which MySQL statement in the page is the problem?  line
 4 certainly doesn't help.

 Tim








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

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



Re: [PHP-DB] mysql_real_escape_string

2007-04-27 Thread bedul
u use localhost right? try ip instead.
127.0.0.1
- Original Message -
From: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Sent: Saturday, April 28, 2007 6:44 AM
Subject: [PHP-DB] mysql_real_escape_string



 The following PHP command

 $new_maintainers_notes =
 mysql_real_escape_string($new_maintainers_notes);

 returned this error while running in a ***cron***.

 Warning: mysql_real_escape_string(): Access denied for user:
 '[EMAIL PROTECTED]' (Using password: NO)
 in
/home2/actsmin/actsministries-www/memberservices/administration/ministry_dir
ectory_annual_review_maintenance.php on line 39

 Warning: mysql_real_escape_string(): A link to the server could not be
 established
 in
/home2/actsmin/actsministries-www/memberservices/administration/ministry_dir
ectory_annual_review_maintenance.php on line 39

 where

 $new_maintainers_notes = Listing has been set for it's annual review;



 But when I return it from the web --- ie http://www... no
 error.

 Any idea why the cron is upset?

 Ron


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



Re: [PHP-DB] SELECT string

2007-04-23 Thread bedul
cmiiw.. since i don't the visual what u said bellow
- Original Message -
From: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Sent: Tuesday, April 24, 2007 11:31 AM
Subject: [PHP-DB] SELECT string



 I am looking for help to write a SELECT syntax to help me process a
 directory searching query tool I am developing.
you have a dir like this??
root
-include
-main
-body
--admin
--user

u want to search a file inside the dir?
why don't you create a function that read inside the dir and return query
for insert as database
1. read all file inside
2. create an insert query
3. refresh the query (repair the table?)

and then.. u can use select but target it to the database not the directory


 If you start at
 http://www.actsministrieschristianevangelism.org/ministrydirectory/ and
 under 'Step 1:' click Business a form is displayed.

 My question is how would you generate the SELECT syntax for the search
 results Could Include a given category and Must Include a given
must include?? require u mean?

 category based on what the user has inputted through this form?

 Ron



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



Re: [PHP-DB] php portfolio

2007-04-19 Thread bedul
nope.. nothing dumb on your question.
- Original Message -
From: Matt Anderton [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Thursday, April 19, 2007 8:49 AM
Subject: [PHP-DB] php portfolio


 I have a kind-of off topic rookie question:

 most programmers have a web portfolio right?  -- a URI to put on their
 resume that has examples of their work.  what do employers expect to see
if
 they ask for such an example?  a working web app?  links to multiple
working
 web apps?  actual code?
well the style of your code make how good you are...
but remember.. if you work alone.. that's no problem.. the problem is when u
work on a team
-

 I am dying to break into PHP/MySQL programming and have gotten a nibble
from
 an employer who is asking for such a URI.  I don't have any professional
 programming experience, but have several small projects that I would like
an
 interested employer to see.  what is the best way to present it/them?
just
 a link to one of my finished projects?  can an experienced programmer get
a
 strong enough sense of how I code by looking at the end result (probably a
 dumb question)?
my suggestion was.. to improve your skill.. U have to be complained and meet
problem during your programing. more problem will improve your prog skill.
but don't stress because of it


 thanks,
 matt


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



[PHP-DB] Re: [PHP-WIN] Did anyone receive the same email

2007-04-09 Thread bedul
i just ignore it!!
the very strange was.. i receive in bahasa indonesia or Indonesian
Languages
- Original Message -
From: sam rumaizan [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Tuesday, April 10, 2007 11:17 AM
Subject: [PHP-WIN] Did anyone receive the same email


   Did anyone receive the same email? I did not ask to be
unsubscript(removed) from php-windows mailing list. Is this another problem
in this website?

 [EMAIL PROTECTED] wrote:  Hi! This is the ezmlm program. I'm
managing the
 php-windows@lists.php.net mailing list.

 I'm working for my owner, who can be reached
 at [EMAIL PROTECTED]

 To confirm that you would like

 [EMAIL PROTECTED]

 removed from the php-windows mailing list, please send an empty reply
 to this address:


[EMAIL PROTECTED]
et

 Usually, this happens when you just hit the reply button.
 If this does not work, simply copy the address and paste it into
 the To: field of a new message.

 or click here:

mailto:[EMAIL PROTECTED]
s.php.net

 I haven't checked whether your address is currently on the mailing list.
 To see what address you used to subscribe, look at the messages you are
 receiving from the mailing list. Each message has your address hidden
 inside its return path; for example, [EMAIL PROTECTED] receives messages
 with return path:
 [EMAIL PROTECTED]

 Some mail programs are broken and cannot handle long addresses. If you
 cannot reply to this request, instead send a message to

 and put the entire address listed above
 into the Subject: line.


 --- Administrative commands for the php-windows list ---

 I can handle administrative requests automatically. Please
 do not send them to the list address! Instead, send
 your message to the correct command address:

 To subscribe to the list, send a message to:



 To remove your address from the list, send a message to:



 Send mail to the following for info and FAQ for this list:





 Similar addresses exist for the digest list:





 To get messages 123 through 145 (a maximum of 100 per request), mail:



 To get an index with subject and author for messages 123-456 , mail:



 They are always returned as sets of 100, max 2000 per request,
 so you'll actually get 100-499.

 To receive all messages with the same subject as message 12345,
 send an empty message to:



 The messages do not really need to be empty, but I will ignore
 their content. Only the ADDRESS you send to is important.

 You can start a subscription for an alternate address,
 for example [EMAIL PROTECTED], just add a hyphen and your
 address (with '=' instead of '@') after the command word:



 To stop subscription for this address, mail:



 In both cases, I'll send a confirmation message to that address. When
 you receive it, simply reply to it to complete your subscription.

 If despite following these instructions, you do not get the
 desired results, please contact my owner at
 [EMAIL PROTECTED] Please be patient, my owner is a
 lot slower than I am ;-)

 --- Enclosed is a copy of the request I received.

 Return-Path:
 Received: (qmail 73200 invoked by uid 1010); 9 Apr 2007 18:07:59 -
 Delivered-To: [EMAIL PROTECTED]
 Delivered-To: [EMAIL PROTECTED]
 Received: (qmail 73185 invoked from network); 9 Apr 2007 18:07:59 -
 Received: from unknown (HELO lists.php.net) (127.0.0.1)
 by localhost with SMTP; 9 Apr 2007 18:07:59 -
 Return-Path:
 Authentication-Results: pb1.pair.com [EMAIL PROTECTED];
sender-id=unknown
 Authentication-Results: pb1.pair.com [EMAIL PROTECTED];
spf=permerror; sender-id=unknown
 Received-SPF: error (pb1.pair.com: domain yahoo.com from 207.206.148.78
cause and error)
 X-PHP-List-Original-Sender: [EMAIL PROTECTED]
 X-Host-Fingerprint: 207.206.148.78 unknown Linux 2.4 w/o timestamps
 Received: from [207.206.148.78] ([207.206.148.78:7945]
helo=[207.206.148.78])
 by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
 id 31/F4-01624-FF08A164 for
 ; Mon, 09 Apr 2007 14:07:59 -0400
 Received: from no.name.available by [207.206.148.78]
 via smtpd (for [216.92.131.4] [216.92.131.4]) with ESMTP; Mon, 9 Apr 2007
13:09:33 -0500
 Received: from drpepper.local[127.0.0.1] by drpepper.local[127.0.0.1]
 (SMTPD32); Mon, 9 Apr 2007 13:08:23 -0600
 Message-ID:
 From:
 To:

 Subject: UNSUBSCRIBE
 Date: Mon, 9 Apr 2007 13:08:23 -0600
 MIME-Version: 1.0
 Content-Type: text/plain;
 charset=windows-1252
 Content-Transfer-Encoding: quoted-printable

 UNSUBSCRIBE







 -
 Food fight? Enjoy some healthy debate
 in the Yahoo! Answers Food  Drink QA.

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



Re: [PHP-DB] tables

2007-03-30 Thread bedul
u ask on this db not on win..
i think..

 you mean how to call everypage with just one page???

 table width=50% border=0 cellspacing=3 cellpadding=0
   tr
 td?php echo img src='index.php?ph=.$photoFileName[2].'/ ;
?/td
 td?php echo img src='index.php?ph=.$photoFileName[3].'/ ;
?/td
   /tr
   tr
 tdnbsp;/td
 td?php echo img src='/album/img/.$photoFileName[0].'/ ;
?/td
   /tr
 /table

- Original Message -
From: elk dolk [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, March 30, 2007 3:42 PM
Subject: [PHP-DB] tables


 I think it should be something like this:

 table width=50% border=0 cellspacing=3 cellpadding=0
   tr
 td?php echo img src='/album/img/.$photoFileName[2].'/ ;
?/td
 td?php echo img src='/album/img/.$photoFileName[3].'/ ;
?/td
   /tr
   tr
 tdnbsp;/td
 td?php echo img src='/album/img/.$photoFileName[0].'/ ;
?/td
   /tr
 /table

 -
 TV dinner still cooling?
 Check out Tonight's Picks on Yahoo! TV.

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



Re: [PHP-DB] Help creating tables and fields

2007-03-29 Thread bedul

- Original Message -
From: Karl James
To: 'bedul'
Sent: Thursday, March 29, 2007 10:40 AM
Subject: RE: [PHP-DB] Help creating tables and fields


bedul,

wow great information and so quick.
very greatfull for that.

Would you mine baby stepping for me?
[bedul]
i don't understand what u said.. but i read as something nice
my real name was gunawan (pronounce as Gun - A - One )
=
I am using dreamweaver 8 to build my pages.
[bedul]
i'm using not 1!! but 3!! text editor, html editor (dreamweaver) and text
based html editor..
fyi.. i build scratch in excel. that editor was crimson editor (this free) ,
Ace Html (trial).. since u already use DW.. don't try.. you might try to
download it..

plz remember.. u not superman.. we only able to create page using php. in
this era.. u probably able to use html, db, javascript and template
building..
owww man.. fyi.. i'm not that strong created by myself. even i already
create using both of i said earlier.


see attach
u might hard to read the languages i use. but i mean in the attach was..
this is my scratch design
===
But I can do in code as well.
I just created a connection to my database.
So, now I am just trying to create the username and password field
on my dwt template page? Would that be correct or what should be my first
step?
[bedul]
that's better.. but u supposed to create map link for the aplication
there were 3 who use this page.
let view the guest first..
1. guest enter the web (www.fotball.com)
2. in there what he/she able to see (for guest only) = what the scratch of
guest??
3. are there anything else that guest able to see??

then let view the user
1. user enter the web
2. user view opening page
3. login
4. if login failed
5. what he/she view after login
6. other page that he/she able to see

admin
i think.. for this.. self explain.
===
Should we just create the tables first through phpmyadmin page.
That is where it is easier to see everything, the tables that is.
[bedul]
the reason why you must to build the scratch (before goes online and able to
program).. is to figure what table we can use??
after u able to build the scratch page (html).. then u goes to build the
table..
===
Please continue with your thoughts.

Karl James (TheSaint)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.theufl.com






[bedul]
last suggestion..
u can improve the skill if you
1. created as many page
2. complain by your user
3. lazy?? i too lazy type textbox and then i create a function that return
textbox
function inpText($name, $dValue, $size, $max){
 $temp ='INPUT TYPE=text name='.$name.'';
 $temp .='value='.$dValue.' size=';
 $temp .=$size. maxlength=$max;
 return $temp;
}
like above.. heheheehee

4. always ask to everyone (include me) about something u can't do like how
to make my page become ajax??


resepOnLine.xls
Description: MS-Excel spreadsheet
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] help in database design

2007-03-28 Thread bedul
what is site mean in here??

- Original Message -
From: Suprie [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Wednesday, March 28, 2007 5:03 PM
Subject: [PHP-DB] help in database design


 hi all,

 i need help in design a database, our office is hospital equipment
supplier,
 we had a list of items, each items had it's own configuration, and
 each item could consist of several item. we also had contract that
 have a lot of site, sometimes equipmend that have been ordered
 different from what the site received, in that case we made a change
 request...

 for now we have this

 |contract|--|has|-|site|
|
|
|item||material|
|
|
   |configuration|

i rather confused on configuration.. but plz send me a light??



 but i really confused about the Change Request thing, we have to keep
 both what have been ordered and what have been received... where
 should i put it, sorri for my bad english

 tq

--
-- Table structure for table `rsib_contract`
--

CREATE TABLE `rsib_contract` (
  `conId` int(11) NOT NULL,
  `conItemID` int(11) NOT NULL,
  `conSiteID` int(11) NOT NULL,
  `conDesc` varchar(100) collate latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `rsib_contract`
--


-- 

--
-- Table structure for table `rsib_item`
--

CREATE TABLE `rsib_item` (
  `itemId` int(11) NOT NULL,
  `itemName` varchar(45) collate latin1_general_ci NOT NULL,
  `itemStat` varchar(4) collate latin1_general_ci NOT NULL,
  `itemDesc` text collate latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `rsib_item`
--


-- 

--
-- Table structure for table `rsib_material`
--

CREATE TABLE `rsib_material` (
  `matId` int(11) NOT NULL,
  `matName` varchar(34) collate latin1_general_ci NOT NULL,
  `matDesc` text collate latin1_general_ci NOT NULL,
  `matItemId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `rsib_material`
--


-- 

--
-- Table structure for table `rsib_site`
--

CREATE TABLE `rsib_site` (
  `siteId` int(11) NOT NULL,
  `siteName` varchar(60) collate latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;




 --
 Jangan tanyakan apa yang Indonesia telah berikan pada mu
 tapi bertanyalah apa yang telah engkau berikan kepada Indonesia

 -BEGIN GEEK CODE BLOCK-
 Version: 3.1
 GU/IT  d- s: a-- C++ UL P L++ E W++ N* o-- K-
 w PS  Y-- PGP- t++ 5 X R++ tv  b+ DI D+ G e+ h* r- z?
  --END GEEK CODE BLOCK--

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


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



Re: [PHP-DB] help in database design

2007-03-28 Thread bedul
NOT QUITE..ups.. my bad
- Original Message - 
From: Chris [EMAIL PROTECTED]
To: Suprie [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Thursday, March 29, 2007 6:53 AM
Subject: Re: [PHP-DB] help in database design


 Suprie wrote:
  hi all,
  
  i need help in design a database, our office is hospital equipment 
  supplier,
  we had a list of items, each items had it's own configuration, and
  each item could consist of several item. we also had contract that
  have a lot of site, sometimes equipmend that have been ordered
  different from what the site received, in that case we made a change
  request...
  
  for now we have this
  
  |contract|--|has|-|site|
|
|
|item||material|
|
|
   |configuration|
  
  but i really confused about the Change Request thing, we have to keep
  both what have been ordered and what have been received... where
  should i put it, sorri for my bad english
 
 Why does that have to fit into this scheme?
 
 Why can't it be separate?
well as u mention above.. he already seperated while ago.. 
item and material was 2 different table. and yet it should seperated..

i alreadt received the newest.. i hope he posted but  i posted again
==
site is, the items destination , owh i forgot beside the goods we also
provide services, that could change also just like other items depends
the situation.
=

as i write above.. he mistaken on what the flow goes

 
 create table change_requests (
request_id primary key .. blah blah,
item_ordered text,
item_order_date timestamp, // so you know when you ordered it
item_received text,
item_receive_date timestamp // so you know when you received it.
 );
 
 problem solved ?


 
 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP-DB] Embedded php in javascript

2007-03-25 Thread bedul
i think u have mistaken using javascript
- Original Message -
From: Onochie Anyanetu [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, March 23, 2007 8:38 AM
Subject: [PHP-DB] Embedded php in javascript


 Hi, I am trying to create a pop up alert warning for deleting an entry in
my
 database. What I have is:

 form name=myform
  input type=button value=Delete Venue onClick=if(confirm('Are you sure
in on click.. u may trap em by execute a function or procedure.


 you want to delete ID # ? echo $UID; ?? There is no undo.'))
 {alert('Value deleted? mysql_query(DELETE from table where ID =
'$UID');
 ?')}
  else
 {alert('no changes')}
 /form
remember one things.. by click it u execute the script to del.. u should add
this
return false;

==

 The problem here is that the embedded php is run regardless of if the user
 clicks no, for example if i put php in both the if and the else they will
 both be executed. So does anyone have and idea how to make this work or
 another workaround?


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



Re: [PHP-DB] MySQL queries

2007-03-21 Thread bedul
howdy
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Ron Croonenberg [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Thursday, March 22, 2007 7:06 AM
Subject: Re: [PHP-DB] MySQL queries


 Ron Croonenberg wrote:
  Hello all,
 
  Is there a discussion list for MySQL queries (I have a rookie MySQL
  query question and don't want to bug this list with it)
???
what u mean?? this is the place u can bug about query
well to be honest.. we unable to answer all kind question.. but you might
ask to us. about query, there is no nobs in query (my opinion)
if you face 2 or more table, u probably fail.. but plz don't give up yet.

 http://lists.mysql.com/



 --
 Postgresql  php tutorials
 http://www.designmagick.com/

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


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



Re: [PHP-DB] Accessing Oracle

2007-03-21 Thread bedul

- Original Message -
From: Robert Hicks [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Wednesday, March 21, 2007 11:28 PM
Subject: [PHP-DB] Accessing Oracle


 I have been away from PHP for a while and was wondering what is the
 preferred method of accessing Oracle?
cmiiw
there was a way to access oracle using php. and that's 1 way.
but there some of people see the function not quite fast like Robert.

u might try odbc if you like. or try accessing directly using oracle.. both
way are fine.. i do believe using direct read are the finnest

i don't use oracle actualy.. your statement make me thinks a function give
by php don't give good response. well hope we can use oracle more effective
in the future.

 Robert

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


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



Re: [PHP-DB] Values in a date field

2007-03-19 Thread bedul
sry.. just check the script.. if able.. plz info me
- Original Message -
From: [EMAIL PROTECTED]
To: php-db@lists.php.net
Cc: [EMAIL PROTECTED]
Sent: Sunday, March 18, 2007 8:38 AM
Subject: Re: [PHP-DB] Values in a date field


 Assuming you're using MySQL, try MONTH().  As in:

 SELECT MONTH(SomeDateField) FROM SomeTable

 http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html



 If this isn't a database question, but a general PHP question, try this:

 // For numeric month without leading zero, use n
 echo date(n, strtotime($subscription_begins));

?
$sql=SELECT id,date FROM SomeTable where date2006-11-31 and 2007-1-1;
mysql($sql);
?

the main problem is... what field u search for? are those a birthday field
or what?
my opinion was, the only reason u search like this is for birthday field.


 http://us3.php.net/manual/en/function.date.php

 -TG

 = = = Original message = = =

 I have a $subscription_begins variable.  It the date type.  -MM-DD

 How may I find out the month value (1 to 12) of this variable?

 Ron


 ___
 Sent by ePrompter, the premier email notification software.
 Free download at http://www.ePrompter.com.

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


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



Re: [PHP-DB] IF ( $_POST['submit'] == Update Subscriptions OR $_POST['submit'] == Update Entire Account ) {

2007-03-19 Thread bedul
hi..
- Original Message -
From: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Sent: Monday, March 19, 2007 4:26 AM
Subject: [PHP-DB] IF ( $_POST['submit'] == Update Subscriptions
OR$_POST['submit'] == Update Entire Account ) {



 I am wanting to ask a question about IF statements.

 I have been developing a PHP  mySQL based subscription tracking
 application.

 I am trying to set up an administration screen now where admin could
 update an address, e-mail address, subscription(s), etc. OR (and this is
 the key) update the entire account.

 I have this series of IF statements (below).  I have a bunch of SUBMIT
 buttons on the admin screen so if someone just wants to update the
 address on the admin screen the Update Address button may be
 clicked ... and it is right near the fields to input a change of
 address.  Same thing with Update Subscriptions.  But if the account
 needs multiple changes I have an UPDATE ENTIRE ACCOUNT button at the
 bottom.

 Here are the series of IF statements used to process the form.

 if ( $_POST['submit'] == Update Subscriptions OR $_POST['submit'] ==
 Update Entire Account ) {

 } elseif ( $_POST['submit'] == Update Address OR $_POST['submit'] ==
 Update Entire Account ) {

 } elseif ( $_POST['submit'] == Update E-Mail Address OR
 $_POST['submit'] == Update Entire Account ) {

 } elseif ( $_POST['submit'] == Submit Birth Date OR $_POST['submit']
 == Update Entire Account ) {

 }
i read this line.. and this was realy a waste of script.. i mean this line
$_POST['submit']== Update Entire Account
why this line always show up every if line?? i don't know what your script
looks like.. but i sure you this line is waste of typing.


 I am stuck again.  If on the admin screen someone clicks UPDATE
 ADDRESS the address change is saved.  BUT if I try to do an address
 change and then click UPDATE ENTIRE ACCOUNT the address change isn't
 saved.
from i read above.. when you click update every account. it respond to do
function in this if line
if ( $_POST['submit'] == Update Subscriptions OR $_POST['submit'] ==
Update Entire Account ) {

from this point i suggest to not use submit as condition to begin a
function. are your page contain a lot submit button??
fyi.. i'm indonesian and i'm not good on english.. so forgive me. what i
mean about function in here was.. something below the if

 if ( $_POST['submit'] == Update Subscriptions OR $_POST['submit'] ==
Update Entire Account ) {
//this where i mean function //
}

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



Re: [PHP-DB] Re: odbc problem

2007-03-12 Thread bedul
allright.. i don't blame anyone..
i just wanna say

thanks to everyone for helping me..

perhaps u right.. more rows make the script return ERROR..

- Original Message -
From: Haydar Tuna [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Monday, March 12, 2007 2:53 PM
Subject: [PHP-DB] Re: odbc problem


 Hello,
   I faced same problems. My table had many rows but I couldn't run
 odbc_num_fields. It return -1 result. I looked PHP help file. But I get
rows
 with odbc_fetch_row() function. My operating system was Windows 2003. I
 think, there is a bug odbc_num_fields function in Windows 2003 operating
 systems becuase in Windows 2003 , when I run PHP with IIS I faced many
 problems. :)


 --
 Haydar TUNA
 Republic Of Turkey - Ministry of National Education
 Education Technology Department Ankara / TURKEY
 Web: http://www.haydartuna.net


 bedul [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  - Original Message -
  From: gunawan [EMAIL PROTECTED]
  To: php-db@lists.php.net
  Sent: Monday, March 12, 2007 11:46 AM
  Subject: odbc problem
 
 
  i have this warning.. i don't know what the meaning
  
  Using odbc_num_fields
 
  Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
ODBC][State
  :
  S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
  General server error, SQL state S1000 in SQLExecDirect in
  C:\dokumen_php\tes\odbc\c-6.php on line 12
  -
 
  this is my script.. i know this is simple..
  
  h1Using odbc_num_fields/h1 ?
 
  //include c-config.php;
  $DBname = 'medtrak2'; //'MSAccessDriver'
  $DBuser = _system;
  $DBpass = sys;
 
  $con = odbc_connect($DBname, $DBuser, $DBPass);
  if ($con)
  {
$txt.= odbc connected
   ;
$sql =  select * from PA_Adm;
//this function will execute the sql satametn in
//correspondance to the table in the db
   $exec = odbc_exec($con, $sql);
//int odbc_num_fields ( resource result_id )
   $n= odbc_num_fields($exec); //$Query_ID);
 
   $txt.=br\ntotal column=.$n;
  }
 
  //$txt.= readThisFile($filename);
 
  print $txt;
  ?
 
  ---
 

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


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



Fw: [PHP-DB] Re: odbc problem (update.. SOLVED)

2007-03-12 Thread bedul
SELECT PA_PatMas.PAPMI_Name FROM PA_Adm, PA_PatMas where
PAADM_PAPMI_DR=PAPMI_RowId1 and PAADM_ADMNo = O0002694

i add something from previous
the problem because i show all table and it make error!!
if i just point what i wanted to show.. is not error..

repair for odbc sql.. (if anyone have account for php-help-chm plz info
this)
the max of row odbc can show was 268, more than that.. u will receive
error like
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
ODBC][State:S1000]


- Original Message -
From: Haydar Tuna [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Monday, March 12, 2007 2:53 PM
Subject: [PHP-DB] Re: odbc problem


 Hello,
   I faced same problems. My table had many rows but I couldn't run
 odbc_num_fields. It return -1 result. I looked PHP help file. But I get
rows
 with odbc_fetch_row() function. My operating system was Windows 2003. I
 think, there is a bug odbc_num_fields function in Windows 2003 operating
 systems becuase in Windows 2003 , when I run PHP with IIS I faced many
 problems. :)


 --
 Haydar TUNA
 Republic Of Turkey - Ministry of National Education
 Education Technology Department Ankara / TURKEY
 Web: http://www.haydartuna.net


 bedul [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  - Original Message -
  From: gunawan [EMAIL PROTECTED]
  To: php-db@lists.php.net
  Sent: Monday, March 12, 2007 11:46 AM
  Subject: odbc problem
 
 
  i have this warning.. i don't know what the meaning
  
  Using odbc_num_fields
 
  Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
ODBC][State
  :
  S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
  General server error, SQL state S1000 in SQLExecDirect in
  C:\dokumen_php\tes\odbc\c-6.php on line 12
  -
 
  this is my script.. i know this is simple..
  
  h1Using odbc_num_fields/h1 ?
 
  //include c-config.php;
  $DBname = 'medtrak2'; //'MSAccessDriver'
  $DBuser = _system;
  $DBpass = sys;
 
  $con = odbc_connect($DBname, $DBuser, $DBPass);
  if ($con)
  {
$txt.= odbc connected
   ;
$sql =  select * from PA_Adm;
//this function will execute the sql satametn in
//correspondance to the table in the db
   $exec = odbc_exec($con, $sql);
//int odbc_num_fields ( resource result_id )
   $n= odbc_num_fields($exec); //$Query_ID);
 
   $txt.=br\ntotal column=.$n;
  }
 
  //$txt.= readThisFile($filename);
 
  print $txt;
  ?
 
  ---
 

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


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



Re: [PHP-DB] Re: odbc problem

2007-03-12 Thread bedul
are u indonesian?
- Original Message -
From: IMRAN [EMAIL PROTECTED]
To: bedul [EMAIL PROTECTED]
Cc: php.db php-db@lists.php.net
Sent: Monday, March 12, 2007 8:04 PM
Subject: [PHP-DB] Re: odbc problem


 Send me your code, I'll fix it for you...
nooo.. that's would not necesarry.. i think u miss my lastest posting.. it
already solved
the problem not on code but on.. SQL.

there are more than 300++ field on that table.. and there i should not try
use
select * from table
but should describe what i was going to show like
select patientName from patient

 - Original Message -
 From: bedul [EMAIL PROTECTED]
 To: IMRAN [EMAIL PROTECTED]
 Cc: php.db php-db@lists.php.net
 Sent: Monday, March 12, 2007 12:15 PM
 Subject: Re: odbc problem



 - Original Message -
 From: IMRAN [EMAIL PROTECTED]
 To: bedul [EMAIL PROTECTED]
 Cc: php.db php-db@lists.php.net
 Sent: Monday, March 12, 2007 1:03 PM
 Subject: Re: odbc problem


  Is odbc_num_fields return any value ?
  You can disable the warnings in php.ini file.
 
  Please let me know if that helps...
 nope.. no value has been return.. but it kind strange
 Using odbc_field_len
 No rows found
 odbc connected
 total column=268

 it return the column but not the value inside?? strange??
 the more strange was it should return 300++??

 i'm curious about this warning line
 
 Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
 S1000][Native Code 400] [D:\Aplikasi\xampp\apache\bin\apache.exe] General
 server error, SQL state S1000 in SQLExecDirect in
 D:\Aplikasi\xampp\htdocs\tes\odbc\c-4.php on line 11
 ===
 General server error, SQL 
 any clue anyone.. i believe this the problem begin..

 fyi.. i already close after open the database. but nothing good happen.

 thx to anyone reply..


  - Original Message -
  From: bedul [EMAIL PROTECTED]
  Newsgroups: php.db
  To: php-db@lists.php.net
  Sent: Monday, March 12, 2007 10:21 AM
  Subject: Fw: odbc problem
 
 
  
   - Original Message -
   From: gunawan [EMAIL PROTECTED]
   To: php-db@lists.php.net
   Sent: Monday, March 12, 2007 11:46 AM
   Subject: odbc problem
  
  
i have this warning.. i don't know what the meaning

Using odbc_num_fields
   
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
 ODBC][State
  :
S1000][Native Code 400]
[C:\ProgramFiles\xampp\apache\bin\apache.exe]
General server error, SQL state S1000 in SQLExecDirect in
C:\dokumen_php\tes\odbc\c-6.php on line 12
-
   
this is my script.. i know this is simple..

h1Using odbc_num_fields/h1 ?
   
//include c-config.php;
$DBname = 'medtrak2'; //'MSAccessDriver'
$DBuser = _system;
$DBpass = sys;
   
$con = odbc_connect($DBname, $DBuser, $DBPass);
if ($con)
{
  $txt.= odbc connected
 ;
  $sql =  select * from PA_Adm;
  //this function will execute the sql satametn in
  //correspondance to the table in the db
 $exec = odbc_exec($con, $sql);
  //int odbc_num_fields ( resource result_id )
 $n= odbc_num_fields($exec); //$Query_ID);
   
 $txt.=br\ntotal column=.$n;
}
   
//$txt.= readThisFile($filename);
   
print $txt;
?
   
---
   
 
 

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


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



[PHP-DB] howto: mktime() function

2007-03-12 Thread bedul
i wonder how i can get value from mktime.
my friend want to build mktime using asp but he wonder how to have the value.. 
what he have are the function same as date() on asp.

if someone have time to build the same function but only use date.. plz post 
here

thx in advance


Re: [PHP-DB] auto_increment command

2007-03-11 Thread bedul
u can't
- Original Message -
From: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Sent: Monday, March 12, 2007 7:52 AM
Subject: [PHP-DB] auto_increment command


 I am not sure if that last e-mail went through or not.  I am wondering
 how to re-set the auto_increment field back to 1 in one of my tables.
 Ron

there no such thing reset auto_increment
if you need the reset.. there were way to do that.
rename the table.. then take query to build it
create new table and tralalla.. u have reset it.

fyi. if inside the table already have a data were id was 100.. the next id
must be 101..
btw.. if you want to make your table more clean (i said about.. how random
the num).. there is a way.
what reason u wanna do that??

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



[PHP-DB] Fw: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: gunawan [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Monday, March 12, 2007 11:46 AM
Subject: odbc problem


 i have this warning.. i don't know what the meaning
 
 Using odbc_num_fields

 Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
 S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
 General server error, SQL state S1000 in SQLExecDirect in
 C:\dokumen_php\tes\odbc\c-6.php on line 12
 -

 this is my script.. i know this is simple..
 
 h1Using odbc_num_fields/h1 ?

 //include c-config.php;
 $DBname = 'medtrak2'; //'MSAccessDriver'
 $DBuser = _system;
 $DBpass = sys;

 $con = odbc_connect($DBname, $DBuser, $DBPass);
 if ($con)
 {
   $txt.= odbc connected
  ;
   $sql =  select * from PA_Adm;
   //this function will execute the sql satametn in
   //correspondance to the table in the db
  $exec = odbc_exec($con, $sql);
   //int odbc_num_fields ( resource result_id )
  $n= odbc_num_fields($exec); //$Query_ID);

  $txt.=br\ntotal column=.$n;
 }

 //$txt.= readThisFile($filename);

 print $txt;
 ?

 ---


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



Re: [PHP-DB] Fw: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: Chris [EMAIL PROTECTED]
To: bedul [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Monday, March 12, 2007 12:00 PM
Subject: Re: [PHP-DB] Fw: odbc problem


 bedul wrote:
  - Original Message -
  From: gunawan [EMAIL PROTECTED]
  To: php-db@lists.php.net
  Sent: Monday, March 12, 2007 11:46 AM
  Subject: odbc problem
 
 
  i have this warning.. i don't know what the meaning

 http://www.php.net/manual/en/function.odbc-error.php

 Use the error function and work out what it's complaining about.

it return
 Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
General server error, SQL state S1000 in SQLExecDirect in my script

i don't understand what happen??
apache error?? i already restart the apache

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



[PHP-DB] Re: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: IMRAN [EMAIL PROTECTED]
To: bedul [EMAIL PROTECTED]
Cc: php.db php-db@lists.php.net
Sent: Monday, March 12, 2007 1:03 PM
Subject: Re: odbc problem


 Is odbc_num_fields return any value ?
 You can disable the warnings in php.ini file.

 Please let me know if that helps...
nope.. no value has been return.. but it kind strange
Using odbc_field_len
No rows found
odbc connected
total column=268

it return the column but not the value inside?? strange??
the more strange was it should return 300++??

i'm curious about this warning line

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
S1000][Native Code 400] [D:\Aplikasi\xampp\apache\bin\apache.exe] General
server error, SQL state S1000 in SQLExecDirect in
D:\Aplikasi\xampp\htdocs\tes\odbc\c-4.php on line 11
===
General server error, SQL 
any clue anyone.. i believe this the problem begin..

fyi.. i already close after open the database. but nothing good happen.

thx to anyone reply..


 - Original Message -
 From: bedul [EMAIL PROTECTED]
 Newsgroups: php.db
 To: php-db@lists.php.net
 Sent: Monday, March 12, 2007 10:21 AM
 Subject: Fw: odbc problem


 
  - Original Message -
  From: gunawan [EMAIL PROTECTED]
  To: php-db@lists.php.net
  Sent: Monday, March 12, 2007 11:46 AM
  Subject: odbc problem
 
 
   i have this warning.. i don't know what the meaning
   
   Using odbc_num_fields
  
   Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
ODBC][State
 :
   S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
   General server error, SQL state S1000 in SQLExecDirect in
   C:\dokumen_php\tes\odbc\c-6.php on line 12
   -
  
   this is my script.. i know this is simple..
   
   h1Using odbc_num_fields/h1 ?
  
   //include c-config.php;
   $DBname = 'medtrak2'; //'MSAccessDriver'
   $DBuser = _system;
   $DBpass = sys;
  
   $con = odbc_connect($DBname, $DBuser, $DBPass);
   if ($con)
   {
 $txt.= odbc connected
;
 $sql =  select * from PA_Adm;
 //this function will execute the sql satametn in
 //correspondance to the table in the db
$exec = odbc_exec($con, $sql);
 //int odbc_num_fields ( resource result_id )
$n= odbc_num_fields($exec); //$Query_ID);
  
$txt.=br\ntotal column=.$n;
   }
  
   //$txt.= readThisFile($filename);
  
   print $txt;
   ?
  
   ---
  



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



Re: [PHP-DB] Storing 4KB jpeg images on hospital web server

2007-03-08 Thread bedul
 i do know there's no problem upload 4kb img to database
but is different case for.. 1mb pic.. it always fail.
 
  CREATE TABLE image (
  image_id int(10) unsigned NOT NULL auto_increment,
  image_type varchar(50) NOT NULL default '',
my application said is header


  image longblob NOT NULL,
  image_size bigint(20) NOT NULL default '0',
u don't need size.. since is able to count/strlen from image
-

  image_name varchar(255) NOT NULL default '',
  image_date datetime NOT NULL default '-00-00 00:00:00',
  UNIQUE KEY image_id (image_id)
  );
 
what u mention above, i suggest to use cms like jomlaa

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



Re: [PHP-DB] Storing 4KB jpeg images on hospital web server

2007-03-08 Thread bedul
i will just add a few what happen to me. since i build the same programing
1. sometimes the images where we wanted to upload doesn't upload right.
2. images called from db sometimes don't have match header.. like gif images
but read as png??

- Original Message -
From: Steven Cruz [EMAIL PROTECTED]
To: Micah Stevens [EMAIL PROTECTED]
Cc: Chetan Graham [EMAIL PROTECTED]; php-db@lists.php.net
Sent: Thursday, March 08, 2007 11:58 PM
Subject: Re: [PHP-DB] Storing 4KB jpeg images on hospital web server


 Yeah, do what the boss says,  but I will tend agree, storing the images
 the database will slow it down.  There is one place that holds large
 images and even small vids in the DB.  IO over kill. They have two
 servers to run one database.

nope.. i disagree with that.. since i use pic and my data on same database..
it could say same as reading a lot text.. just imagine pic are a bunch of
word  but in 300line.
to be honest.. i never try above statement. perhaps for a small database (i
point on data), database not slowdown.. but if use for big database.. i
never try about

btw.. img upload to database will never break 1mb (i already try that)

 Micah Stevens wrote:
  On 03/08/2007 01:35 AM, Chetan Graham wrote:
  Back to the Hospital website.  Now the Web Boss wants to put the
  images in
  the DB.  I do feel the webserver folders would simply and well.
  However, we do what the boss says.
 
  I'm with Bastien on this one, I've stored images in a database in the
  past, and although I have to admit that it makes a certain amount of
  sense in the fact it keeps all your data in one place, practically
  it's a pain in the butt. It's faster, more efficient and better in
  almost every respect to let the filesystem do what it does best and
  store the files, and the database deal with data you need to organize
  and sort.
that's correct.
and one small add.. u can backup the data without copy paste all things (i
mean export the database) and make a fuss because it
 
  -Micah
 

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


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



Re: [PHP-DB] PHP_AUTH_USER .htaccess

2007-03-06 Thread bedul

- Original Message -
From: Mike van Hoof [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Tuesday, March 06, 2007 3:02 PM
Subject: [PHP-DB] PHP_AUTH_USER  .htaccess


 Hello,

 I've got a really strange problem, and hope this is the right list to
 post to.

 I got a website with a login, which uses a .htaccess file for
 autentication. That part works like a charm. But when i want to read the
 loggin details with PHP, the variable $_SERVER['|PHP_AUTH_USER'] isn't
 set (in the directory where i logged into)

 when i go a directory back, and view a phpinfo() there i see
 |$_SERVER['|PHP_AUTH_USER']|| is set, so i do a phpinfo() in the
 directory with the .htaccess and it is gone.

 Had anyone ever had experience with this, because i can't find a solution.

 - Mike|
i do believe this can only be answer by your webadmin.. since this might not
your local but using web right??
try ask to them are the php_auth_user is set ON

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



[PHP-DB] Re: [PHP-WIN] Fatal Error: Allocated memory size problem...

2007-03-04 Thread bedul
same here not work for me
- Original Message -
From: Hartleigh Burton [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Monday, March 05, 2007 9:13 AM
Subject: [PHP-WIN] Fatal Error: Allocated memory size problem...


 Hi All,

 I am having some problems while uploading a file to a MySQL database
 relating to file sizes. I have created a script which successfully
 uploads most files to the database, however anything roughly over 1MB
 in size seems to return a PHP error. I am not trying to upload
 anything larger than 15MB. The error I am getting is as follows:

that's weird.. i upload a pic 1mb more.. it error.. database say.. mysql is
DEAD!! or something like that

to avoid this.. i upload the file to a folder not to database.. is not what
i want but it worked..
why not try upload to localhost instead?

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



[PHP-DB] Fw: cara phpasp bisa jalan bareng|how to make asp php work together

2007-03-02 Thread bedul

- Original Message -
From: gunawan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php-windows@lists.php.net; php-db@lists.php.net
Sent: Friday, March 02, 2007 5:10 PM
Subject: cara phpasp bisa jalan bareng|how to make asp  php work together


 wa kirim ke site english jd harap maklum kl pake bahasa inggris

 i have problem to solve.
 my office have only limited budget and only able buy one server and it
only
 asp inside.. the problem is, I want to make that server work for php and
for
 asp which that was already inside (since my office using some aplication
 using asp).

 1.how to make the server able to respon both asp and php.. even thought i
 will not touch the asp??
 2. is better i use apache or iis??

 thx for your reply



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



Re: [PHP-DB] Mysql autentication problem

2007-03-02 Thread bedul

- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem


 Strange. If you look at the users table, is there a password hash in the
 password field?


i think this must be reload?? not just flush?? it happen to me..
or perhaps need some times to realy reload??
 Roberto F Tavares Neto wrote:
  Micah:
 
  I did create the database. Then, I use the:
 
  GRANT ALL PRIVILEGES ON db.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'
 
  to do the 2 and 3 steps.
 
  FLUSH PRIVILEGES
 
  to do the step 4.
 
  But the step 5 really does not work... only on the shell or when I
  remove the password from the user...
 
  Roberto
 
  Micah Stevens escreveu:
  Did you give the user permissions to use the database in question?
 
  Here's my sequence of actions:
 
  .
  1) Create DB if it doesn't exist
  2) Create the user w/password
  3) Give the user permission to use the database.
  4) Flush privileges to update the server.
  5) login and enjoy.
 
  -Micah
 
  Roberto F Tavares Neto wrote:
  Hello,
 
  I'm trying to do a very simple thing: create a database and a user
  to use it.
 
  So, initially, I use the web interface phpmyadmin. Logged as root, I
  created the database, and the user with some password.
 
  But, I could not login using phpmyadmin. Either any php-based system
  could connect to the BD.
 
  So, I make sure that I got the [EMAIL PROTECTED] and [EMAIL PROTECTED]
  created, with permissions and same password. Nothing.
 
  But I *can* log on mysql shell.
 
  One more info: when the user is set without password, it works fine
  on PHP.
 
 
  Does anyone can give me a clue of what is happening?
 
  Thanks!
 
  Roberto
 
 
 
 








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

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



Re: [PHP-DB] Mysql autentication problem

2007-03-02 Thread bedul
now you mention it.
i hope the same problem will solve.

i use in windows (own pc)..not in real-life server.. thx for your repair on my 
missuderstanding
  - Original Message - 
  From: Micah Stevens 
  To: bedul 
  Cc: php-db@lists.php.net 
  Sent: Saturday, March 03, 2007 1:48 PM
  Subject: Re: [PHP-DB] Mysql autentication problem


  Reloading the grant tables should happen almost immediately unless you have 
an extremely large set of users, very little memory, or a very slow computer. 



  On 03/02/2007 06:17 PM, bedul wrote: 
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem


  
Strange. If you look at the users table, is there a password hash in the
password field?



i think this must be reload?? not just flush?? it happen to me..
or perhaps need some times to realy reload??
  
Roberto F Tavares Neto wrote:

Micah:

I did create the database. Then, I use the:

GRANT ALL PRIVILEGES ON db.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'

to do the 2 and 3 steps.

FLUSH PRIVILEGES

to do the step 4.

But the step 5 really does not work... only on the shell or when I
remove the password from the user...

Roberto

Micah Stevens escreveu:
  
Did you give the user permissions to use the database in question?

Here's my sequence of actions:

.
1) Create DB if it doesn't exist
2) Create the user w/password
3) Give the user permission to use the database.
4) Flush privileges to update the server.
5) login and enjoy.

-Micah

Roberto F Tavares Neto wrote:

Hello,

I'm trying to do a very simple thing: create a database and a user
to use it.

So, initially, I use the web interface phpmyadmin. Logged as root, I
created the database, and the user with some password.

But, I could not login using phpmyadmin. Either any php-based system
could connect to the BD.

So, I make sure that I got the [EMAIL PROTECTED] and [EMAIL PROTECTED]
created, with permissions and same password. Nothing.

But I *can* log on mysql shell.

One more info: when the user is set without password, it works fine
on PHP.


Does anyone can give me a clue of what is happening?

Thanks!

Roberto

  
  







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


  



Re: [PHP-DB] recursion in php and mysql

2007-03-01 Thread bedul
hmm.. i think there something going on on this func
mysql_select_db($database)
read more below
==

- Original Message - 
From: Ron Croonenberg [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, March 02, 2007 11:52 AM
Subject: [PHP-DB] recursion in php and mysql


 Hello all,
 
 I wrote an app in php and it uses recursion.
 
 Problem I have is that when I connect to a database using
 mysql_connect($dbhost, $username, $password); and select a table with
 mysql_select_db($database) I cannot access the table anymore from some
 function.

try this
mysql_select_db($database) or die(mysql_error());
=

 Now I can connect and select a database in that php function  but that
 means that process happens A LOT and connecting and selecting everytime
 probably slows down the app quite a bit
 
 Is there a way to connect to a database and select a table globally
 so that I have access to it in ever php function I write ?
 
 thanks,
 
 Ron

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



Re: [PHP-DB] recursion in php and mysql

2007-03-01 Thread bedul
$row = mysql_fetch_array($result, $connection);
this is the problem
you should type
$row = mysql_fetch_array($result, MYSQL_NUM);

there not such things as $connection on the mysql_fetch_array
in mysql_query.. u use that connection.. but not in fetch array


array mysql_fetch_array ( resource result [, int result_type] )


- Original Message -
From: Ron Croonenberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, March 02, 2007 12:36 PM
Subject: Re: [PHP-DB] recursion in php and mysql


Hi Micah,

thanks I have a bunch of things working now.

mysql_fetch_array() is complaining.

I use it like this:

function recursive() {
global $connection;

$result = mysql_query(SELECT * FROM $table WHERE bthb4='$bthb4',
$connection);
$row = mysql_fetch_array($result);
}

the error I got was:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in recursion.php on line 93

I tried: $row = mysql_fetch_array($result, $connection);

But I have the impression that $result  now isn't correct anymore ?

the mysql_fetch_array() is the only function (so far) that complains ?

thanks for your earlier very quick response,

Ron


 Micah Stevens [EMAIL PROTECTED] 03/02/07 12:04 AM 
Yep, just put the connect function outside your recursive loop. You can
then access the connection that is returned by the connect function by
making it global, or passing it by reference by the recursive function.

In other words:

$connection = mysql_connect();
mysql_select_db($database, $connection);

recursive_function($value);

function recursive_function($value)
{
global $connection;

$data = mysql_query($sql, $connection);

recursive_function($data);

}

... or something.. you get the picture.

-Micah



On 03/01/2007 08:52 PM, Ron Croonenberg wrote:
 Hello all,

 I wrote an app in php and it uses recursion.

 Problem I have is that when I connect to a database using
 mysql_connect($dbhost, $username, $password); and select a table with
 mysql_select_db($database) I cannot access the table anymore from some
 function.

 Now I can connect and select a database in that php function  but that
 means that process happens A LOT and connecting and selecting everytime
 probably slows down the app quite a bit

 Is there a way to connect to a database and select a table globally
 so that I have access to it in ever php function I write ?

 thanks,

 Ron



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

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

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



[PHP-DB] auto upload

2007-02-28 Thread bedul
this might a strange code i request, plz forgive my rudeness.

everyday i was update a doc where i always put on d:\report\today.xls where
i use a simple upload document prog (inside only box for upload only? and
submit). the file i upload will save on file folder (inside the upload
folder)

today i want to skip that procedure.. i want to build this web where i open
the site (http://server-e/upload/index.php) then click the button/submit..
this button will triger action where i will upload the d:\report\today.xls
file without using browse/file input.

can u help me?? i do know about the unsafe that metodh.. thx for your
attention.

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



Re: [PHP-DB] csv problem.. read csv from var

2007-02-22 Thread bedul
nope.. u don't give me wrong code
- Original Message - 
From: Niel Archer [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, February 17, 2007 2:43 AM
Subject: Re: [PHP-DB] csv problem.. read csv from var


 Hi
 
 sorry, I misunderstood your problem, it was not too clear to me as the
 code you list shouldn't produce the output you supplied.
 
 try this:
 
 $array = explode(',', $csv);
 
 print br=  . $array[0] . \n;
 print br=  . $array[1] . \n;
 
 for ($i = 2; $i  count($array); ++$i) {
  $txt.= br /= . $array[$i] . \n;
 }
 
 print $txt;
 
 
 Niel
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
the code u mention before i tried to my code and it's not right..
thx for your support

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



[PHP-DB] Re: [PHP-WIN] A measre of security

2007-02-19 Thread bedul

- Original Message -
From: Gustav Wiberg [EMAIL PROTECTED]
To: 'bedul' [EMAIL PROTECTED]; php-windows@lists.php.net
Cc: php-db@lists.php.net
Sent: Monday, February 19, 2007 2:28 PM
Subject: RE: [PHP-WIN] A measre of security




-Original Message-
From: bedul [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 17, 2007 10:26 AM
To: Gustav Wiberg; php-windows@lists.php.net
Cc: php-db@lists.php.net
Subject: Re: [PHP-WIN] A measre of security
Importance: High

cmiiw
- Original Message -
From: Gustav Wiberg [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Wednesday, February 14, 2007 6:39 PM
Subject: [PHP-WIN] A measre of security


Hi!

This is a kind of security-question

I'm starting up a system, where several customers should be able to login
with there own information.
Each company I give unique identity with hard-coding and each company has
its own folder...


Harding-coding, something like:
$company - setIDCompany(1);
$company - setIDCompany(2);
$company - setIDCompany(3);

[bedul]
you should not try hardcoding by your self.. is suffer your health.. hehehe
why don't you use an id.. if you enter this using db.. every new record or
company will given a new id..
like you enter new comp anda the new will have 4 and soon
but if this not what you wanted.. just created a random var like this

i enter new comp.. where the var given = a4s43.. this comp will have id
a4s43 and have folder named a4s43
=
Diffrent folders:
customers/company1
customers/company2
customers/company3

and so on...


This isn't complicated, but when I add a new company...I must be
200% sure that the IDCompany is set correct (There is a chance of setting
the wrong ID for a new company or forgetting to change it)
[bedul]
to search what your id entered .. try use
int mysql_insert_id ( [resource link_identifier] )


Retrieves the ID generated for an AUTO_INCREMENT column by the previous
INSERT query.

===

The companys ARE NOT ALLOWED to see each others information.
[bedul]

try above suggestion.. use random var for folder.. how to get em??

$idFromTable=mysql_insert_id ($handle);

$rndNum=rand(2100);

$randomID=a.$idFromTable.s.$rndNum;


Is there any good way of solving this with some sort of
comparision-mechanism or something like that? Any thoughts?
[bedul]

interesting. can u explain more about 'sort of comparision-mechanism'??


Hi there!

Thanx for your suggestion! What I meant with comparisaion-mechanism was that
I
Want to have som kind of fucntion that is almost impossible to set ID 1 -
Company 2, impossible to set ID2 for company 1. The function should check
Somehow that the right ID is set.. Like ID 1 = Company1, ID 2 = Company and
so on...

Best Regards
/Gustav Wiberg
[bedul]
i believe u talk about random id?? cmiiw
why not using random by combine ip regis  date regis?

read the 4 line.. i think, u might ask about cookie or session?? i believe
this is more close what u describe above. if this like webhosting.. u might
use share folder but if this not hosting.. i more simple. (yet less simple
actualy from hard coding /omg)

what u say before.. actualy i don't get it? why you have to make share
folder? why not the file put on 1 folder. use database to describe the file
then u probably able to share the file and make folder (it not real folder
actualy.. it is just a database).

fyi search for sharing data aplication. try this link
 http://sourceforge.net/projects/simpledirectory
 http://sourceforge.net/projects/phpexplorer
 http://sourceforge.net/projects/phpshell
 http://savannah.nongnu.org/projects/phpexplore/

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



[PHP-DB] Re: [PHP-WIN] A measre of security

2007-02-17 Thread bedul
cmiiw
- Original Message -
From: Gustav Wiberg [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Wednesday, February 14, 2007 6:39 PM
Subject: [PHP-WIN] A measre of security


Hi!

This is a kind of security-question

I'm starting up a system, where several customers should be able to login
with there own information.
Each company I give unique identity with hard-coding and each company has
its own folder...


Harding-coding, something like:
$company - setIDCompany(1);
$company - setIDCompany(2);
$company - setIDCompany(3);

[bedul]
you should not try hardcoding by your self.. is suffer your health.. hehehe
why don't you use an id.. if you enter this using db.. every new record or
company will given a new id..
like you enter new comp anda the new will have 4 and soon
but if this not what you wanted.. just created a random var like this

i enter new comp.. where the var given = a4s43.. this comp will have id
a4s43 and have folder named a4s43
=
Diffrent folders:
customers/company1
customers/company2
customers/company3

and so on...


This isn't complicated, but when I add a new company...I must be
200% sure that the IDCompany is set correct (There is a chance of setting
the wrong ID for a new company or forgetting to change it)
[bedul]
to search what your id entered .. try use
int mysql_insert_id ( [resource link_identifier] )


Retrieves the ID generated for an AUTO_INCREMENT column by the previous
INSERT query.

===

The companys ARE NOT ALLOWED to see each others information.
[bedul]

try above suggestion.. use random var for folder.. how to get em??

$idFromTable=mysql_insert_id ($handle);

$rndNum=rand(2100);

$randomID=a.$idFromTable.s.$rndNum;


Is there any good way of solving this with some sort of
comparision-mechanism or something like that? Any thoughts?
[bedul]

interesting. can u explain more about 'sort of comparision-mechanism'??

 ===

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



Re: [PHP-DB] csv problem.. read csv from var

2007-02-16 Thread bedul

- Original Message -
From: Niel Archer [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, February 16, 2007 1:59 PM
Subject: Re: [PHP-DB] csv problem.. read csv from var


 hi

  the problem i have is.. how about the csv is a var
  DATA===
  $csv=
  A507257,3/2/2007,\Hematologi Lengkap,Cholesterol Total,LDL
  Cholesterol,Trigliserida,HDL Cholesterol,Asam Urat,Gula Darah Puasa,Gula
  Darah 2 Jam PP,Kreatinin,Ureum,Bilirubin Total,Alkali
  Fosfatase,SGOT,SGPT,Urine Lengkap,Feses Rutin,Darah Samar
Faeces,VDRL,Anti -
  HBs,Total PSA,HBsAg,Anti - HCV Total\;
 
  what should i do to make the ouput like above.

 Use

   $arry = explode(',', $csv);

=CODE
?
$csv=
 A507257,3/2/2007,\Hematologi Lengkap,Cholesterol Total,LDL
 Cholesterol,Trigliserida,HDL Cholesterol,Asam Urat,Gula Darah Puasa,Gula
 Darah 2 Jam PP,Kreatinin,Ureum,Bilirubin Total,Alkali
 Fosfatase,SGOT,SGPT,Urine Lengkap,Feses Rutin,Darah Samar
Faeces,VDRL,Anti -
 HBs,Total PSA,HBsAg,Anti - HCV Total\;

$arry = explode(',', $csv);

foreach($arry as $val){
 $txt.= =.$val . br /\n;
}

print $txt;

?

=OUTPUT===
= A507257
=3/2/2007
=Hematologi Lengkap
=Cholesterol Total
=LDL Cholesterol
=Trigliserida
=HDL Cholesterol
=Asam Urat
=Gula Darah Puasa
=Gula Darah 2 Jam PP
=Kreatinin
=Ureum
=Bilirubin Total
=Alkali Fosfatase
=SGOT
=SGPT
=Urine Lengkap
=Feses Rutin
=Darah Samar Faeces
=VDRL
=Anti - HBs
=Total PSA
=HBsAg
=Anti - HCV Total

 to separate the variable into an array, then process it using foreach as
 before

i'll already try that! fail.. it has tobe return 3 not ..10
thx for the reply

 Niel

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


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



[PHP-DB] csv problem.. read csv from var

2007-02-15 Thread bedul
i have problem with reading csv.. for i know the example script i get was
BASIC SCRIPT=
$handle = fopen(hasillab.csv, r);
$data2=$handle;
while($data = fgetcsv($handle, 1000, ,)){
 foreach($data as $str)
  $data2.=br=  .$str;

}

the result was:
==OUTPUT==
= A507257
= 3/2/2007
= Hematologi Lengkap,Cholesterol Total,LDL Cholesterol,Trigliserida,HDL
Cholesterol

hasillab.csv contain
A507257,3/2/2007,Hematologi Lengkap,Cholesterol Total,LDL
Cholesterol,Trigliserida,HDL Cholesterol,Asam Urat,Gula Darah Puasa,Gula
Darah 2 Jam PP,Kreatinin,Ureum,Bilirubin Total,Alkali
Fosfatase,SGOT,SGPT,Urine Lengkap,Feses Rutin,Darah Samar Faeces,VDRL,Anti -
HBs,Total PSA,HBsAg,Anti - HCV Total

the problem i have is.. how about the csv is a var
DATA===
$csv=
A507257,3/2/2007,\Hematologi Lengkap,Cholesterol Total,LDL
Cholesterol,Trigliserida,HDL Cholesterol,Asam Urat,Gula Darah Puasa,Gula
Darah 2 Jam PP,Kreatinin,Ureum,Bilirubin Total,Alkali
Fosfatase,SGOT,SGPT,Urine Lengkap,Feses Rutin,Darah Samar Faeces,VDRL,Anti -
HBs,Total PSA,HBsAg,Anti - HCV Total\;

what should i do to make the ouput like above.

until now.. i try save the var into files then i use basic script to load it

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



Re: [PHP-DB] unixODBC + PHP 4.4.4

2007-02-13 Thread bedul
- Original Message -
From: Drewfus [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Tuesday, February 13, 2007 5:08 PM
Subject: [PHP-DB] unixODBC + PHP 4.4.4


 Hi,

 I've installed unixODBC with the EasySoft ODBC Driver and have
connectivity
 working to my MS-SQL Server fine.  I can login with the iSQL tool and
 perform queries without issue - I then moved onto recompiling PHP/Apache
 with unixODBC support, but when testing it I see:

 *Fatal error*: Call to undefined function: odbc_connect()

 The PHP script is pretty basic:

i do believe the odbc on your comp are not configure yet.
another problem may cause from ODBC library (php)
for oracle.. u can connect without using odbc (since oracle have own
library)

i suggest you search for the library (odbc) if you don't use oracle (i read
below)
or perhaps u search for oracle libary instead odbc..

 ?php
  putenv(ODBCINI=/etc/odbc.ini);
  putenv(ODBCINSTINI=/etc/odbcinst.ini);
  putenv(LD_LIBRARY_PATH=/usr/local/easysoft/unixODBC/lib);
i don't think above is necessary.. since the default PHP must already
connect to the odbc..


  $Conn= odbc_connect (db,user,pass)


   or die (Can't open ODBC-DSN);
  $Rec = odbc_exec ( $Conn, select * from viewDB)
   or die (Can't execute QUERY);

  echo Records returnd : .odbc_num_rows($Rec).br\n;
  echo br\n;
 ?

 I verified that during the configure, With unixODBC Support was showing up
 as Yes, also there were no compile errors whatsoever.  When I check
 phpinfo() - I see the following configure command:


 './configure' '--with-png-dir=/usr/local/lib'
 '--with-zlib-dir=/usr/local/lib' '--with-gd'
 '--with-apache=../apache_1.3.27'
 '--with-unixODBC=shared,/usr/local/easysoft/unixODBC' '--without-mysql'
 '--with-oracle=/u01/OraHome1' '--with-oci8=/u01/OraHome1'

 The build date is updated with today's date, and the Oracle connectivity
 still works - any ideas on why odbc_connect would be an undefined function
 with that configure command?

 Thanks,
 -D


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



Re: [PHP-DB] Strange action with =

2007-02-12 Thread bedul
sry i don't get what u mean??
- Original Message -
From: Peter Beckman [EMAIL PROTECTED]
To: PHP-DB Mailing List php-db@lists.php.net
Sent: Tuesday, February 13, 2007 8:29 AM
Subject: [PHP-DB] Strange action with =


 I'm looping through an array and I did this:

  $rate = $mydata[$prefix];

 Now, in some cases $mydata[$prefix] wasn't set/defined, so I expected
$rate
 to not be defined, or at least point to something that wasn't defined.

 Instead, PHP 5.1.6 set $mydata[$prefix] to nothing.

 If I had:

  $mydata[1] = 3;
  $mydata[3] = 2;
  $mydata[5] = 1;

 And did a loop from $i=1; $i++; $i=5 I'd get:

  $mydata[1] = 3;
  $mydata[2] = ;
  $mydata[3] = 2;
  $mydata[4] = ;
  $mydata[5] = 1;

the reason mydata2 empty was because it don't have value in it!!

full source plz
why u don't try this

$txt.=ol;
foreach($mydata as $nm=$val){
$txt.=\nli $nm = $val;
$txt2=br\$mydata[$nm] = $val;
}
$txt.=/ol;

print $txt;


 Is this expected?  A bug?  Fixed in 5.2.0?  I know I shouldn't set a
 reference to a variable that doesn't exist, but the expected result is a
 warning/error, not for PHP to populate an array.

we should cross check again.

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



[PHP-DB] Re: [PHP-WIN] (DRW) Ordenar por fecha

2007-02-12 Thread bedul
english plz

you know.. i'm not native with english.. but using english is very helpfull
to me for solve your problem

- Original Message -
From: Anuack Luna [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Friday, February 09, 2007 6:28 AM
Subject: [PHP-WIN] (DRW) Ordenar por fecha


 Hola Foreros

 Tengo la siguiente pregunta.

 Como puedo darle la orden a un juego de registro que me lo ordene por
fecha?

 SELECT *
 FROM mi_sitio_personal_menu
 ORDER BY id DESC

 Si le digo Orden by fecha Desc... Me lo ordena por números, no por fecha.

 La fecha de la siguiente forma: DIA/MES/AÑO

 Alguna sugerencia... Adjunto database


 --
 -- Estructura de tabla para la tabla `mi_sitio_personal`
 --

 CREATE TABLE `mi_sitio_personal` (
   `id` int(11) NOT NULL auto_increment,
   `publico_privado` varchar(10) default '0',
   `usuario` varchar(255) default NULL,
   `fecha` varchar(100) default NULL,
   `categoria` varchar(100) default NULL,
   `pequena_comentario` text,
   `comentario` text,
   `archivo` varchar(255) default NULL,
   PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

 --
 -- Volcar la base de datos para la tabla `mi_sitio_personal`
 --

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


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



[PHP-DB] Re: [PHP-WIN] SQL SERVER EXPRESS upgrade

2007-02-06 Thread bedul
that hard

if this mysql i created an user like this

//this where i access my db
server = hospital.mis01 
//this self explain
user= root
pass= toor

probably u can do in sql server??


- Original Message - 
From: Harpreet [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Tuesday, February 06, 2007 10:13 PM
Subject: [PHP-WIN] SQL SERVER EXPRESS upgrade


Not sure if anyone can help, but I upgraded from msde to sql server
express and now I cannot access my php website from another machine
other then the database server machine. 

Regards,
Harpreet Kaur

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

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



[PHP-DB] Re: [PHP-WIN] SSL on Windows Server 2003

2007-02-06 Thread bedul
sry i don't understand what writen here
let me repair
- Original Message -
From: Gustav Wiberg [EMAIL PROTECTED]
To: php-windows@lists.php.net
Sent: Tuesday, February 06, 2007 9:39 PM
Subject: RE: [PHP-WIN] SSL on Windows Server 2003


Hi there guys!

Do you know any way of getting NEXT row based on a specific ID in db?

?php
$thisRow = $_GET[thisrow];
$thisID = $_GET[thisID];


//Get next row (With ID and sortorder-nr from db
//
$sql2 = SELECT IDPrice, sortOrder FROM tbprices WHERE sortOrder . $db -
safeQuote($thisRow);
$dbArray = $db - makeArray($sql2);
$dbNextSortOrder = $dbArray[sortOrder];
$dbNextIDPrice = $dbArray[IDPrice];


I can't have sortorder (larger than) BECAUSE the sortorder don't have to be
larger in the actual table. Of course, I can loop through a table but it
doesn't seem so good programming practice
?

Best regards
/Gustav Wiberg

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

$thisRow = $_GET[thisrow];
$thisID = $_GET[thisID];
//repir on this
$sql2 = SELECT IDPrice, sortOrder FROM tbprices WHERE sortOrder . $db -
safeQuote($thisRow). AND IDPrice  $thisID ORDER BY `IDPrice` ASC  LIMIT
0,1;

$dbArray = $db - makeArray($sql2);
$dbNextSortOrder = $dbArray[sortOrder];
$dbNextIDPrice = $dbArray[IDPrice];

?

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



[PHP-DB] ODBC: access

2007-02-05 Thread bedul
?php
$txt.=h1TEST CONNECT/h1;
// to have this working:
// 1- u  have first to creat ur access database using MS
// Access  (i asume u know how to do this). My database
// that i used in my example is called Questionaire.mdb.
// the table in it is called Results
//
// 2- then u have to add this database to ODBC in the
// control panel.
//
// 3- the adition happens by adding MS Access Driver to the
// System DNS tab in ODBC Data Source Administrator. if
// u have that MS Access Driver in User DNS tab, then
// u have to delete it.
//
// 4- click on Add in the System DNS tab.
//
// 5- choose MS Access Driver from the Creat New
// Database Source window and click finish.
//
// 6- then the ODBC MS Access Setup window will pop-up.
//
// 7- give the driver the name that you want to use in your
// PHP scripting. i used here MSAccessDriver.
// 8- after this, choose the Select button in ODBC MS
// Access Setup to set the path of your Access database.
//
// 9-then u r done!!
// this odbc_connect does the connection to the driver i
// created in the ODBC Administrator

$con= odbc_connect(gundamDB, gunawan,'' ); //= for the first i don't use
config yet
if ($con)
{
 echo odbc connected
;

}
else
 echo odbc not connected
;

odbc_close($con) ;


 echo 'p a href=index.htmreturn/a';
?

the question is..
$con= odbc_connect(gundamDB, gunawan,'' );
in odbc.. i make the user landavia and password landavia
but this return able to connect.. is there something wrong???

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



Re: [PHP-DB] What effects MySQL connection's character set

2007-01-26 Thread bedul
try to configure on the html.. 
i think on header..

 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
- Original Message - 
From: Niel Archer [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, January 27, 2007 3:12 AM
Subject: [PHP-DB] What effects MySQL connection's character set


 Hi all
 
 How is the character set of returned data effected?  I have a DB using
 UTF-8 encoding., PHP is set to use UTF-8 internally. However the MySQL
 connection returns Latin1 data.  How can I get it to return UTF-8 data
 instead.
 
 TIA
 
 Niel
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP-DB] php using odbc

2007-01-26 Thread bedul
can u help me?
1.i wanna build a connection using odbc but i don't have any example.
what url can i visit? 
2. odbc i want to connect was on this url.. plz view to help me.

http://indoupload.net/files/view/803/odbc%20problem.jpg

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



Re: [PHP-DB] php using odbc

2007-01-26 Thread bedul
thx for your info and example
i hope i can use the link i gave in previous message 

i want to connect to there
- Original Message - 
From: Vic [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, January 27, 2007 9:44 AM
Subject: Re: [PHP-DB] php using odbc


 
 look this as one example of MSAccess connection:
 
 
  ?
  $sDefaultDir = 'C:\apache\htdocs\MDB'; // path dir MDB
  $sMDBfile= cop.mdb;  // MSaccess database name
  
  $sMDBpathAndFilename = $sDefaultDir.'\\'.$sMDBfile;  // concatenate
  
  // define dsn
  $sCfg_dsn = DRIVER=Microsoft Access Driver (*.mdb);
   DBQ=$sMDBpathAndFilename;
   UserCommitSync=Yes;
   Threads=3;
   SafeTransactions=0;
   PageTimeout=5;
   MaxScanRows=8;
   MaxBufferSize=2048;
   DriverId=281;
   DefaultDir=$sDefaultDir;
  
  // if you need login and pass
  $sCfg_dsn_login = ;
  $sCfg_dsn_mdp = ;
  
   
   $hConn = odbc_connect( $sCfg_dsn, $sCfg_dsn_login, $sCfg_dsn_mdp ) or
die( Not connection. );
 
   $sql = select * from table;
   $result= odbc_exec($hConn,$sql);
 
 while(odbc_fetch_row($result)) 
 {
 $db_field1 = odbc_result($result,field_name);
 }   
 
 ?
 
 
 check rest of odbc function in php manual.
 
 bye,
 
 
 
 
 you wrote:
 
  can u help me?
  1.i wanna build a connection using odbc but i don't have any example.
  what url can i visit? 
  2. odbc i want to connect was on this url.. plz view to help me.
 
  http://indoupload.net/files/view/803/odbc%20problem.jpg
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP-DB] find row id where i input

2007-01-26 Thread bedul
i'm creating a big database using mysql.
after input into database i want to know what id (row id) where my data
input whereabout.
consider i don't have many user where access and input in same time.. but i
just want to make preparation for the case.

how can i able to know what id i have?? any suggestion

=
Inserted rows: 1
Inserted row id: 2 (Query took 0.0277 sec)


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