[PHP-DB] parse error.

2003-09-25 Thread Mücella Erdem Efe
I am a new programmer of PHP4.3.3 an MySql 3.23 .

When below script is executed
Parse error: parse error, unexpected T_DNUMBER in c:\program
files\apache group\apache\htdocs\ilkdeneme21.php on line 17
 is being seen.

This may be very simple but I could not solve it.Could you help me for this
error?
Thanks for your attention
[EMAIL PROTECTED]


?
$dbname = 'mycmpe';

mysql_connect(localhost,username);
if (mysql_select_db($dbname))
{ echo connected;}
else
{ echo not connected;}

$query=insert into dene (day,start_time) values (2003.09.25,22:30)  ;
   $result=mysql_query($query);
   if ($result))
{ echo data girildi;}
else
{ echo data girilemedi;
  exit;}

?

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



[PHP-DB] Defining relation between tables

2003-09-29 Thread Mücella Erdem Efe
Hi ;
I am a new programmer of PHP4.3.3 an MySql 3.23 .

In MyPhpAdmin

  CREATE DATABASE phpmyadmin;
  GRANT SELECT,INSERT,DELETE ON phpmyadmin.* to 'local host user';
  enter the databasename in $cfg['Servers'][$i]['pmadb'] (this works)
But the statement below dosen't work at all.


  CREATE TABLE `PMA_bookmark` (
   id int(11) DEFAULT '0' NOT NULL auto_increment,
   dbase varchar(255) NOT NULL,
   user varchar(255) NOT NULL,
   label varchar(255) NOT NULL,
   query text NOT NULL,
   PRIMARY KEY (id)
 ) TYPE=MyISAM COMMENT='Bookmarks';

enter the tablename in $cfg['Servers'][$i]['bookmarktable']

 CREATE TABLE `PMA_relation` (
   `master_db` varchar(64) NOT NULL default '',
   `master_table` varchar(64) NOT NULL default '',
   `master_field` varchar(64) NOT NULL default '',
   `foreign_db` varchar(64) NOT NULL default '',
   `foreign_table` varchar(64) NOT NULL default '',
   `foreign_field` varchar(64) NOT NULL default '',
   PRIMARY KEY (`master_db`, `master_table`, `master_field`),
   KEY foreign_field (foreign_db, foreign_table)
 ) TYPE=MyISAM COMMENT='Relation table';

put the relation table name in $cfg['Servers'][$i]['relation']

CREATE TABLE `PMA_table_info` (
   `db_name` varchar(64) NOT NULL default '',
   `table_name` varchar(64) NOT NULL default '',
   `display_field` varchar(64) NOT NULL default '',
   PRIMARY KEY (`db_name`, `table_name`)
 ) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';

put the table name in $cfg['Servers'][$i]['table_info']


CREATE TABLE `PMA_column_comments` (
   id int(5) unsigned NOT NULL auto_increment,
   db_name varchar(64) NOT NULL default '',
   table_name varchar(64) NOT NULL default '',
   column_name varchar(64) NOT NULL default '',
   comment varchar(255) NOT NULL default '',
   PRIMARY KEY (id),
   UNIQUE KEY db_name (db_name, table_name, column_name)
 ) TYPE=MyISAM COMMENT='Comments for Columns';

put the table name in $cfg['Servers'][$i]['column_comments']






in the CONFIG.INC.PHP

$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';// Database used
for Relation, Bookmark and PDF Features
// - leave blank
for no support
$cfg['Servers'][$i]['bookmarktable'] = 'PMA_bookmark';  // Bookmark
table - leave blank for no bookmark support
$cfg['Servers'][$i]['relation']  = 'PMA_relation';  // table to
describe the relation between links (see doc)
//   - leave
blank for no relation-links support
$cfg['Servers'][$i]['table_info']= 'PMA_table_info';// table to
describe the display fields
//   - leave
blank for no display fields support
$cfg['Servers'][$i]['table_coords']  = 'PMA_table_coords';  // table to
describe the tables position for the PDF
//   schema -
leave blank for no PDF schema support
$cfg['Servers'][$i]['pdf_pages'] = 'PMA_pdf_pages'; // table to
describe pages of relationpdf
// - leave blank
if you don't want to use this
$cfg['Servers'][$i]['column_comments'] = 'PMA_column_comments';
// table to store columncomments
// - leave blank
if you don't want to use this




Inspite of every things have done  when I try to use the tables in the one
of a database MyPhpAdmin sends this message so I can't define  any relation
between two tables.

first ; The message is something like this The extra features that were
used to work with the related tables, were
deactivated.
second;PMA Database ...  ok

relation Table ... not activated.
table_info ...   not activated
table_coords ...   not activated
pdf_pages ...   not activated
creating PDF ... not activated

column_comments ...   not activated
show of column comment :  not activated


Please help me.
thanks for your attentions.

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



[PHP-DB] using href=abc.php/?day=......

2003-10-21 Thread Mücella Erdem Efe
Hi;

I need to use a href=abc.php/?day=..  /a  statement in a  xxx.php
file.

I have to use a php  variable on the right of the day variable  like a
href=abc.php/?day=+?echo $start_day;? /a.
When i get this variable in abc.php file

if (phpversion() = 4.1.0)
 { $vars = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS); }
 else { $vars = $_REQUEST; }
 print_r($vars);

Output is
Array ( [day] =(nothing)

When i use a constant instead of  variable like a
href=abc.php/?day=12-12-2002/a.
it works .

Please help me about using a php variable in a href statement.

thanks for your attention.

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



[PHP-DB] Using printer in Php code

2004-02-27 Thread Mücella Erdem Efe
I use the Php 4.3.3 on WindowsXP with Apache Server
 I want to use
$handle = printer_open(PCLAB1);  statement in my php program
 But it does not work. Almost I have defined the extension=php_printer.dll
  and printer.default_printer = PCLAB1in the  c:/windows/php.ini
file.
The error  is
  Fatal error: Call to undefined function: printer_open() in
pclab1printer.php on line 57.

Help me please

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