PHP - Git With Master Branch Only?
I've been following http://nvie.com/post...branching-model, which recommends master, release, and develop branches, in addition to hotfix and feature branches.
Since I work with another developer only, we did not use release branches as staging area but used everything else.
Well, to ease on merges, the new idea is as such: use only master branch, and get rid of all others. Feature and hotfix branches can branch off of master and be merged back into master. So in short, only have one main branch called master, and remove the develop branch.
Since we have {local, develop, production} servers, this will not impact actual development and testing.
Removing 'develop' branch will however remove that "extra" intermediate step between the master branch and feature branches
Do you see any problems with this? Or it's "to each his own, however you want to use git, use it" type thing?
Similar TutorialsHi Guys, I have a php mail script that calculates a branch to send it to dependant on the postcode which works fine as it goes to the right email and when I echo the script to show branch name it comes up with the correct branch name. However when you open the email I cannot get it to display the 'branch name'. It will display all the other bits of information that has been 'posted' from the form. But wont display the branch name form an sql database table. The code below proves that it finds the branch name. while($row = mysql_fetch_array( $result )) { $ter = $row['Ter']; $branchemail = $row['BranchEmail']; $branchname = $row['BranchName']; } This is the PHP Mail in HTML part below <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . ( $row['BranchName']) . '</td> But when the email comes through the branch name is always blank. However on this page I can get it to echo the branch name and it displays the branch name and also emails to the branch email address. Any ideas why it doesn't work. Cheers, S I need to configure my SMTP mail port so I can use mail() function to send out e-mails. However, I am confused as to which php.ini to configure. I see four files when I do a search under C:\WAMP\ php.ini (C:\wamp\bin\apache\Apache2.2.11\bin) php.ini (C:\wamp\bin\php\php5.3.0) php.ini-development (C:\wamp\bin\php\php5.3.0) php.ini-production (C:\wamp\bin\php\php5.3.0) Thanks Hello, I have a database with the following tables: students groups exams examDay relation master detail ======= ===== ===== ======= ====== ====== ===== idStudent idGroup idExam idExDay idRelation idMaster idDetail idGroup groupName examName exDate idGroup idGroup idMaster studName idExDay idRelation idExam idExam idStudent coursesAtt idExDay I am trying to make a report from the Master and Detail tables that will have the table header like this: Group | Examination Date | Student Name | Exam1 | Exam2| .... | Exam n in which Exam1, Exam2,... are the exams names and they had to take the values from coursesAtt column. Is this possible? I could make a view (doing joins and group by) by the results will be displayed on row. That's why I ask for your help. Thanks My application has 3 user types. Admin , User and Super Admin. Users can register as either Admin or User. Each user type has different UI and functionality. The problem: If a particular type of user reports a problem/bug in his/her login, it is difficult to pin point to the exact problem. So if I could able to login as that user, then it will be very easy to point out the bug/problem. So I'm looking for some kind of master password. Using any username and the master password I should be able to login AS that user. Any suggestions..? Hello: Seeking some input, please. I use single-pages in my admin panel to update and maintain each corresponding page on the front end. Code: [Select] ADMIN = FRONT END a_Home.php = Home.php a_About.php = About.php Etc... The code is the same for each page, except I have to rename the TABLE everytime I make a new page: Code: [Select] <?php include('../include/myConn.php'); //contains your mysql connection and table selection include('../include/myCodeLib.php'); include('include/myCheckLogin.php'); include('include/myAdminNav.php'); include('ckfinder/ckfinder.php'); include('ckeditor/ckeditor.php'); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $myTitle = mysql_real_escape_string($_POST['myTitle']); $myDesc = mysql_real_escape_string($_POST['myDesc']); $myHeader = mysql_real_escape_string($_POST['myHeader']); $mySubHeader = mysql_real_escape_string($_POST['mySubHeader']); $myPageData = mysql_real_escape_string($_POST['myPageData']); $sql = " UPDATE myTestimonials SET myTitle = '$myTitle', myDesc = '$myDesc', myHeader = '$myHeader', mySubHeader = '$mySubHeader', myPageData = '$myPageData' "; mysql_query($sql) && mysql_affected_rows() ?> <script language="JavaScript"> alert("This page was updated!"); location.href = "a_Testimonials.php"; </script> <?php } $query=mysql_query("SELECT * FROM myTestimonials") or die("Could not get data from db: ".mysql_error()); while($result=mysql_fetch_array($query)) { $myTitle=$result['myTitle']; $myDesc=$result['myDesc']; $myHeader=$result['myHeader']; $mySubHeader=$result['mySubHeader']; $myPageData=$result['myPageData']; } ?> <!DOCTYPE HTML> <html> <head> <meta name="author" content="MontyTheWebmaster.com" /> <meta charset="ISO-8859-1" /> <title>Admin Area</title> <?php echo spAdminLinks(); ?> </head> <body> <div id="siteContainer"> <div id="topContainer"> <?php echo spAdminTopMenu(); ?> </div> <div id="topMenuContainer"> <div id="topMenu"> <?php echo spAdminMenu(); ?> </div> </div> <div id="contentContainer"> <div id="mainContent"> <h1>Editing: Testimonials</h1> <p> <form method="post" action="<?php echo $PHP_SELF;?>"> <input type="hidden" name="POSTBACK" value="EDIT"> <div style="float: left; width: 120px; margin-right: 30px;"> Page Title: </div> <div style="float: left; width: 550px;"> <textarea cols="80" rows="1" name="myTitle"><?php echo $myTitle; ?></textarea> </div> <div style="clear: both;"><br /></div> <div style="float: left; width: 120px; margin-right: 30px;"> Page Description: </div> <div style="float: left; width: 550px;"> <textarea cols="80" rows="1" name="myDesc"><?php echo $myDesc; ?></textarea> </div> <div style="clear: both;"><br /></div> <div style="float: left; width: 120px; margin-right: 30px;"> Page Header: </div> <div style="float: left; width: 550px;"> <textarea cols="80" rows="1" name="myHeader"><?php echo $myHeader; ?></textarea> </div> <div style="clear: both;"><br /></div> <div style="float: left; width: 120px; margin-right: 30px;"> Page SubHeader: </div> <div style="float: left; width: 550px;"> <textarea cols="80" rows="1" name="mySubHeader"><?php echo $mySubHeader; ?></textarea> </div> <div style="clear: both;"><br /></div> Page Content:<br /> <textarea cols="80" id="myPageData" name="myPageData"><?php echo $myPageData; ?></textarea> <script type="text/javascript"> CKEDITOR.replace( 'myPageData', { filebrowserBrowseUrl : 'ckfinder/ckfinder.html', filebrowserImageBrowseUrl : 'ckfinder/ckfinder.html?Type=Images', filebrowserFlashBrowseUrl : 'ckfinder/ckfinder.html?Type=Flash', filebrowserUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images', filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash' } ); </script> <br /> <input type="submit" value="Submit" /> </form> </p> </div> <div style="clear: both;"></div> </div> <div id="footerContainer"> <?php echo spAdminFooter(); ?> </div> </div> </body> </html> What I am curious about is how can I take this page and make it so I can add a new page, delete a page, etc. all from just one page like above? And on the frontend, what would be the best way to display the data in a search engine friendly way (i.e. without QueryStrings like MyPage.php?id=2 I want to create a master-detail page using PHP. Rather than getting data from a MYSQL database, I want to get the data from an associative array. Is this possible? Please someone show me the way forward. Please help. Hello, I have three arrays of integers $arrayA, $arrayB, and $arrayC. $ArrayA is a "master array" meaning the array I need to match the other two to. $arrayB and $arrayC are generated by my functions in the application and meet specific criteria. As such, arrays B and C will never have any intersecting values, but both should have matches in $arrayA, and I need to generate an array which contains only the values of arrayA which match either B or C. After finding some documentation here (http://www.metrocomp.mocsi.eu/w3/php/func_array_intersect.html) I tried using array_intersect : array_intersect ($arrayA, $arrayB, $arrayC) However this does not work as described and returns no results as there are no values which are contained in all three arrays. I wrote the below as a work around, and it works just fine but I would think there is a better way? $temp1 = array_intersect($arrA, $arrB); $temp2 = array_intersect($arrA, $arrC); $temp3 = array_merge($temp1, $temp2); $final_array = array_unique($temp3); Thanks for looking! Carmen Hi all, Something that pretty much always seems to bother me when i write something for someone else is that the include path's for some reason are screwed up. Now i thought let's look in phpinfo to see what the path is: So i get the following: Local value: .:/usr/lib/php:/usr/local/lib/php:/home/godzilla4361/php Master value: .:/usr/lib/php:/usr/local/lib/php Now which one is used for what? I just can't find a way to create a way to easily transport scripts from server to server, because i always have to manually adjust the path for inclusion otherwise i get those warning: failed to open stream etc. Anyone with tips and or advice and maybe even knows what to use those local and master values for? This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=352271.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=326872.0 Hi, I am stuck. I have used dreamweaver to create a master details page with links to the details page successfully, but I would like to display the master details page results in 3 columns rather than the 1 column that dreamweaver defaults. As the site becomes richer the content will increase yielding many results, therfore the content displayed in a single column will require the users to scroll way down the page. So, as it is now the results display as follows: Plant1 Plant2 Plant3 Plant4 Plant5 Plant6 Plant7 Plant8 Plant9 etc... I would like them to display as follows: Plant1 Plant4 Plant7 Plant2 Plant5 Plant8 Plant3 Plant6 Plant9 Here is my code thus far: <?php require_once('Connections/connGND.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_connGND, $connGND); $query_rsBotanicalA = "SELECT * FROM plants WHERE CatIDB = 'A'"; $rsBotanicalA = mysql_query($query_rsBotanicalA, $connGND) or die(mysql_error()); $row_rsBotanicalA = mysql_fetch_assoc($rsBotanicalA); $totalRows_rsBotanicalA = mysql_num_rows($rsBotanicalA); ?> <table border="0" align="left"> <?php do { ?> <tr> <td align="left"><a href="plantdetails.php?recordID=<?php echo $row_rsBotanicalA['PlantID']; ?>"> <?php echo $row_rsBotanicalA['BotanicalName']; ?> </a></td> </tr> <?php } while ($row_rsBotanicalA = mysql_fetch_assoc($rsBotanicalA)); ?> </table> Could someone help me to write this code, as I have been unsuccessful maintaining the links. I have been able get the results to display in the columsn as I would like, but I haven't been able to figure it out while maintaining the links! Thanks. Hi, I would like to display my master details page links to the details pages in three columns rather than a single column. Below is the do-while code I have thus far, and I am stuck. Could someone please mock up this code quick, because I know it is a simple syntax error somewhere. <?php do { echo "<table border='0'>"; for ($y=1; ; $y++) { echo "<tr>"; for ($x=1; $x<=3; $x++) { echo "<td align='left'><a href="plantdetails.php?recordID=echo $row_rsBotanicalA['PlantID'];">; echo $row_rsBotanicalA['BotanicalName']; </a></td>" } echo "</tr>"; } } while ($row_rsBotanicalA = mysql_fetch_assoc($rsBotanicalA)); echo "</table>"; ?> Hi Friends , We have the JSON Data coming in this format, $invoice_data = { "CONTACT_ID": "1", "INV_SERIAL_NO": "100", "NAME": "baby", "INV_DATE": "2018-06-27", "DUE_DATE": "2018-06-27", "CURRENCY": "KD", "SUBTOTAL": "143", "TAX_TOTAL": "13", "shipment_data": [ { "SHIP_SERIAL_NO": "44", "MASTER_NO": "55", "HOUSE_NO": "88", "cost_revenue_items": [ { "CHARGE_REF": "tt", "CURRENCY": "INR", "QUANTITY": "2", "SELLING_RATE": "45", "EXCHANGE_RATE": "987" },{ "CHARGE_REF": "ii", "CURRENCY": "INR", "QUANTITY": "2", "SELLING_RATE": "45", "EXCHANGE_RATE": "456" },{ "CHARGE_REF": "op", "CURRENCY": "INR", "QUANTITY": "2", "SELLING_RATE": "45", "EXCHANGE_RATE": "456" } ] } ] } How to write DELETE End-point for child data-set "cost_revenue_items". What I mean to say is how to handle the request to delete one of item from "cost_revenue_items".
When "cost_revenue_items" will be deleted ,master "invoice_data" will be updated. This update , we can handle by PUT, but how do we know under that PUT, we have to Will JSON request to delete "cost_revenue_items" looks like this ,if it want to delete last record : $invoice_data = { "CONTACT_ID": "1", "INV_SERIAL_NO": "100", "NAME": "baby", "INV_DATE": "2018-06-27", "DUE_DATE": "2018-06-27", "CURRENCY": "KD", "SUBTOTAL": "143", "TAX_TOTAL": "13", "shipment_data": [ { "SHIP_SERIAL_NO": "44", "MASTER_NO": "55", "HOUSE_NO": "88", "cost_revenue_items": [ { "CHARGE_REF": "tt", "CURRENCY": "INR", "QUANTITY": "2", "SELLING_RATE": "45", "EXCHANGE_RATE": "987" },{ "CHARGE_REF": "ii", "CURRENCY": "INR", "QUANTITY": "2", "SELLING_RATE": "45", "EXCHANGE_RATE": "456" } ] } ] } Kindly help me to know , how JSON request will look like ?
Thanks a lot |