colap
Members-
Posts
302 -
Joined
-
Last visited
Everything posted by colap
-
How can i insert into table with auto_increment column ?
colap replied to colap's topic in MySQL Help
insert into tablename(col1,col2) values("a","b"); I got this error: Field 'id' doesn't have a default value. id is the auto_increment primary key column. -
It's a mysql table. The first column is int(11) auto_increment not null primary key, I want to insert data into that table without specifying the first column name. What would be the sql query? The firs column is col1 with auto_increment.The value for the first column would be automatically inserted.Is it? insert into tablename(col2,col3) values("a","b");
-
How can i add combobox in zend framework form? Is there anything like that ? $catagory=new Zend_Form_Element_Combobox;
-
How can i upload image and .flv or .swf file with zend framework?
colap posted a topic in Frameworks
How can i upload image and .flv or .swf file with zend framework? Can anyone post complete code to create form and to upload image and video file? Which function to use for upload? Is it? $obj=new Zend_Transfer_Adapter_Http(); $obj->receive(); -
Is it for only me? I can't post anything without the approval of moderator.
-
Can anyone post a generic update function to update mysql table. The manual approach: update $tablename set $column1='a', $column2='b' where $id=$value;
-
I get this message: Note: This message is awaiting approval by a moderator.
-
Does this help? http://colalinux.blogspot.com/2010/11/sql-tutorial.html
-
How can i use single quote for values? $qry='insert into tablename values('a','b');';
-
It's about making a form for a web page. Which is better? Using table or divs? Which do you use? <form action='a.php' method='post'> <table> ............. </table> </form> <form action='a.php' method='post'> <div> ............. </div> </form>
-
Done. <?php class Forall{ public $var_a=100; function process(){ echo 'This is for testing'.'<br>'; echo '$var_a: '.$this->var_a.'<br>'; } } $obj=new Forall(); $obj->process(); ?> <form action='post' method='insvideo.php'> videotitle: <input type='text' name='nm_videotitle'/><br> description: <input type='text' name='nm_description' /><br> createddate: <input type='text' name='nm_createddate' /><br> image: <input type='text' name='nm_image' /><br> <input type='submit' /> </form>
-
test.php: <?php class Forall{ public $var_a=100; function process(){ echo 'This is for testing'.'<br>'; echo '$var_a: '.$this->var_a.'<br>'; } } $obj=new Forall(); $obj->process(); <form action='post' method='insvideo.php'> videotitle: <input type='text' name='nm_videotitle'/><br> description: <input type='text' name='nm_description' /><br> createddate: <input type='text' name='nm_createddate' /><br> image: <input type='text' name='nm_image' /><br> <input type='submit' /> </form> ?> error: How can i know the line number for error?
-
In c++ class we can declare function inside a class and then we can describe that function at bottom. Can i do this in PHP class? In C++ class: class Myclass{ void doall(); } void Myclass::doall(){ ............. ............. }
-
header("Location: filename.html"); In filename.html echo $_SESSION['first_name'];
-
Post code.
-
yep, the field is set as DATE, and i used NOW() , but this is still inserting as 0000-00-00 arrrghhh http://colalinux.blogspot.com/2011/02/insert-date-into-mysql-table.html
-
Could not understand. Are you suggesting about developing Forums?
-
What type of project that can be. It won't be a pesonal website. It would be a database oriented website.
-
Can't echo newline. <?php class Myclass{ public $var_one=100; public $var_two=400; function printvalues(){ echo 'Inside printvalues function\n'; echo '$var_one: '.$this->var_one.'\n'; } } $obj=new Myclass(); $obj->printvalues(); echo '$var_two: '.$obj->var_two.'\n'; ?>
-
Is there anything like in C++ to extend or to inherit a class :public , :protected ? Only extending a class can one access public and protected all members in PHP?
-
Getting notice/warning in this line: Notice: Trying to get property of non-object in C:\Program Files\Zend\Apache2\htdocs\mysite\application\layouts\scripts\layout.phtml on line 19 echo $this->navigation()->menu()->setAcl($obj_menuacl)->setRole($_auth->getStorage()->read()->uid); <head> <?php echo $this->headScript()->appendFile($this->baseUrl() . '/js/jwplayer.js'); ?> <?php echo $this->headScript()->appendFile($this->baseUrl() . '/js/swfobject.js'); ?> <?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/topmenu.css'); ?> </head> <?php $flXml=new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml','nav'); $container = new Zend_Navigation($flXml); Zend_Registry::set('Zend_Navigation', $container); ?> <div id="nav-menu"> <?php $obj_menuacl=new Model_MenuAcl(); $_auth=Zend_Auth::getInstance(); echo $this->navigation()->menu()->setAcl($obj_menuacl)->setRole($_auth->getStorage()->read()->uid); echo $this->loggedInAs(); echo '<br><br>'; echo 'You are in: ' . $this->navigation()->breadcrumbs()->setLinkLast(false)->setMinDepth(0)->render(); ?></div> <div class="mainbody"><?php echo $this->layout()->content; ?></div> <br />
-
If i declare protected variable in a class how can i access those variable in other class inheriting that class? Can anyone post example code?
-
Notice: Trying to get property of non-object in layout.phtml on line 19
colap replied to colap's topic in Frameworks
I'm getting this Notice doing http://localhost/mysite/public Notice: Trying to get property of non-object in layout.phtml on line 19 -
What to do if i put the MenuAcl.php file in layouts/script folder or in public folder?
-
<head> <?php echo $this->headScript()->appendFile($this->baseUrl() . '/js/jwplayer.js'); ?> <?php echo $this->headScript()->appendFile($this->baseUrl() . '/js/swfobject.js'); ?> <?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/topmenu.css'); ?> </head> <?php $flXml=new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml','nav'); $container = new Zend_Navigation($flXml); Zend_Registry::set('Zend_Navigation', $container); ?> <div id="nav-menu"> <?php $obj_menuacl=new Model_MenuAcl(); $_auth=Zend_Auth::getInstance(); echo $this->navigation()->menu()->setAcl($obj_menuacl)->setRole($_auth->getStorage()->read()->uid); echo $this->loggedInAs(); echo '<br><br>'; echo 'You are in: ' . $this->navigation()->breadcrumbs()->setLinkLast(false)->setMinDepth(0)->render(); ?></div> <div class="mainbody"><?php echo $this->layout()->content; ?></div> <br />