Jump to content

dennismonsewicz

Members
  • Posts

    1,136
  • Joined

  • Last visited

Everything posted by dennismonsewicz

  1. i figured out my problem This line was in the install SQL file: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; i commented it out and everything works like a charm!
  2. well like i said its Joomla's way of doing things. It somehow inserts that bit of information in one of the SQL tables
  3. well the way the Joomla backend loads the menu structure into the DB is by an XML file here is the bit of code containing the XML code: <menu>Tmo Deductible</menu> <submenu> <menu link="option=com_tmodeductible&section=phoneplan">Phone Deductibles</menu> <menu link="option=com_tmodeductible&section=plan_by_state">Deductibles By State</menu> </submenu> The submenu's rowid auto increments in the DB bu the main menu does not
  4. make sure to replace all of your opening php statements (<?) with this <?php see if that helps
  5. I have a joomla component i have custom built but for some reason when it installs the main menu for the admin the main menu link does not auto increment in the DB (row id). Everything else does though. I understand that this is a third party script question but the auto incrementing is where my problem lies.. any help?
  6. i would also read up on your comparison operators http://us3.php.net/operators.comparison
  7. ah gotcha... i am writing a Joomla (BOOOO) component and to install the file you have to write a sql file to install of the content and menu structure and its a pain in the butt. And the Joomla Forums suck! You can never get any help! Thanks for your help here man!
  8. so my SQL could look like this INSERT INTO `table` (`field1`) VALUE ('something', 'somethingelse'); INSERT INTO `table` (`field1`) VALUE ('something', mysql_insert_id);
  9. hmm thanks for the help... i am writing a SQL file can you use this in the file? like: INSERT INTO `table` (`field1`) VALUE ('something'); INSERT INTO `table` (`field1`) VALUE ('something') WHERE mysql_insert_id();
  10. Is there a way to create a SQL statement that will insert into a database and the next SQL entry will grab the rowid of the first statement entered?
  11. try $pageurl = $_SERVER['PHP_SELF];
  12. make sure your path to this file is right: require("class.phpmailer.php"); So make sure that is the correct path to that file
  13. I have built a Joomla component that handles two databases and allows a user to edit content across two databases. My problem is in the JToolBarHelper() functions... for example: if you click on the add button you get the default page that allows you to select which database you want to view. Any ideas on how to fix this?
  14. ah gotcha... thanks for your help... I am pretty new to writing functions and classes.
  15. here is the function $d = $_GET['db']; class TableAttDeductible extends JTable { switch($d) { case "phoneplan": var $rowid = null; var $make = null; var $model = null; var $deductible = null; var $published = 0; break; case "plan_by_state": var $rowid = null; var $planid = null; var $planmakeid = null; var $planmodel = null; var $plantier = null; var $plandeductible = null; var $insurance_only_premium = null; var $insurance_warranty_premium = null; var $warranty_only_premium = null; var $published = 0; break; } function __construct(&$d) { parent::__construct( '#__' . $d, 'rowid', $d ); } }
  16. can someone explain this error: Parse error: syntax error, unexpected T_SWITCH, expecting T_FUNCTION
  17. on $row i get this: bool(false) on $cid i get this: array(1) { [0]=> string(1) "2" }
  18. row is set like this: $row =& JTable::getInstance('phoneplan', 'Table');
  19. I am building a customized component for my joomla instance and I am receiving the following error: Fatal error: Call to a member function load() on a non-object (it is on line 43) This is line 43: if (isset($cid[0])) { $row->load($cid[0]); //LINE 43 } This is how the variable is being set: $cid = JRequest::getVar('cid', array(), 'GET', 'array'); what am i doing wrong? Thanks in advance for any and all help!
  20. thanks! I think i have solved my problem... i just have one more question. how do you grab all of the URL variables? example: http://www.mysite.com/index.php?action=view&id=56 how would i grab the action and the view say all together? I know how to use the PHP superglobal $_GET but is there a way to grab both vars at once?
  21. how would i validate the following without having to replicate the form for submission twice? echo '<p>Select your state</p>'; echo '<form action="file.php?action=make" method="post">'; echo '<select name="state" onChange="this.form.submit();">'; echo '<option value=""></option>'; $test_qry = mysql_query("SELECT * FROM tbl_name")or die(mysql_error()); while($row = mysql_fetch_object($test_qry)) { echo '<option value="' . $row->state_abbr . '">' . $row->state_abbr . '</option>'; } echo '</select>'; echo '<input type="submit" value="Submit" name="state_submit" />'; echo '</form>'; so i want to see if the user selects a state. but how do i check it without writing the form twice?
  22. I have the following code: echo $e_display; echo '<p>Select your state</p>'; echo '<form action="tmotier.php?action=make" method="post">'; echo '<select name="state" onChange="this.form.submit();">'; echo '<option value=""></option>'; $test_qry = mysql_query("SELECT * FROM tbl_name")or die(mysql_error()); while($row = mysql_fetch_object($test_qry)) { echo '<option value="' . $row->state_abbr . '">' . $row->state_abbr . '</option>'; } echo '</select>'; echo '<input type="submit" value="Submit" />'; echo '</form>'; the $e_display var is being set like so: if(empty($_POST['state'])) { $e_display = '<p style="color: red">You must select a state to continue!</p>'; } else { $e_display = ''; } Well when you load the page the error message is still displayed even if you have not submitted anything.. any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.