Jump to content

Search the Community

Showing results for tags 'phpmyadmin'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. I'm really sorry for the poor explanation, I am absolutely not familiar with PHP. I would like to get data from my phpmyadmins 2 table, so I can display how many posts have been submitted with the same category type. One is called "posts" and the other one is called "categories". I have attached a picture to see the how it looks like. What I want is to make the category tables "id" equal to the posts tables "catagory_id", and then display how many posts have bben uploaded of each category. Here is how far I went with the coding, which is nowhere close to my expectations: <div class="stats__div"> <p class="stats__text">Categories</p> <p> <?php $all_categories_query = "SELECT * FROM categories ORDER BY title ASC"; $all_categories = mysqli_query($connection, $all_categories_query); while ($category = mysqli_fetch_assoc($all_categories)) : ?> <p><?= $category['title'] ?> <?= $category['id'] ?></p> <?php endwhile ?> <?php $all_posts_query = "SELECT * FROM posts GROUP BY category_id"; $all_posts = mysqli_query($connection, $all_posts_query); while ($posts = mysqli_fetch_assoc($all_posts)) : ?> <p><?= $posts['category_id'] ?></p> <?php endwhile ?> </p> </p> </div> I know, the coding is at the edge of being horrible, I am really sorry for that. I have tried my best. Does anyone know how to do that? I have seen that the right solution is using "array_count_values", but all the examples I have seen were lists. Any kind of help is highly appreciated!
  2. I've been trying to write some code that takes user supplied information, sends it to a database (phpmyadmin) and also displays it elsewhere in the app. I'm to the point I'm trying to get it to the database right now. The issue is that it's not making it to the DB and is being lost somewhere. There's no warnings, no errors, nothing being returned anywhere to help resolve the problem, except in the browsers dev tools and that is different whether it's chrome or FF. It's also something that I have trouble seeing being responsible for the loss of data. In Chrome it comes back as -> Page layout may be unexpected due to Quirks Mode In FF as -> Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. But, like I said, I can't see how this is to blame for the data not making it to the DB and I see no difference in the layout or style anyways. At the top of add_post.php is the following: <?php require("assets/initializations.php"); if(isset($_POST['add_post']) && !empty($_FILES['post_image'])) { $filename = $_FILES['post_image']['name']; $file_tmp_name = $_FILES['post_image']['tmp_name']; $filesize = $_FILES['post_image']['size']; $file_ext = explode('.', $filename); $file_act_ext = strtolower(end($file_ext)); $allowed = array('jpeg', 'jpg', 'png', 'gif'); if(!in_array($file_act_ext, $allowed)) { echo "<script>alert('File Type Not Allowed');</script>"; //not sure how well this size check is working, have to experiment more //also need to research how to do an initial image check } elseif($filesize > 10000000) { echo "<script>alert('Image Is Too Large');</script>"; } else { $file_new_name = uniqid('', true) . "." . $file_act_ext; $dir = "/opt/lampp/htdocs/qcic/usernet/img/"; $target_file = $dir . basename($file_new_name); move_uploaded_file($file_tmp_name, $target_file); $post_obj->addNews( $_POST['title'], $_POST['content'], $_POST['category'], $_POST['status'], $_POST['post_type'], $_POST['tags'], $target_file ); echo "<script>alert('Your Post Has Been Added');</script>"; mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); } } ?> <?php require('includes/header.php'); ?> Most of it is handling the image. The Post and User objects are instantiated in initializations.php at the top. The image uploads fine, everything works except the post object. The class for that is -> <?php class Post { private $conn; private $user_obj; public function __construct($conn, $user) { $this->conn = $conn; $this->user_obj = new User($conn, $user); } public function addNews($title, $content, $category, $status, $type, $tags, $image) { if(!empty($title) && !empty($content)) { $title = strtoupper($title); $title = mysqli_real_escape_string($this->conn, $title); $content = nl2br($content); $content = mysqli_real_escape_string($this->conn, $content); $added_by = $this->user_obj->getUsername(); $query = mysqli_query($this->conn, "SELECT top_cat_id FROM top_categories WHERE top_cat_title='$category'"); $row = mysqli_fetch_array($query); $cat_id = $row['top_cat_id']; $statement = $this->conn->prepare("INSERT INTO news VALUES ('', '$title', '$content', '$added_by', '$category', '$cat_id', '$image', '$tags', '$status', '$type', '?', '?', '?', '?');"); if($statement) { $statement->execute(); } else { echo "You messed up somewhere"; } } } } ?> I'm not the best or most experienced coder, for sure, but in the few months I've been learning PHP I've written a few DB queries now and this looks right to me. The first attempt didn't have prepared statements but that wasn't getting the data to the DB either. I've checked that the number of fields being sent match the number of fields in the DB, been tinkering with a few small things since yesterday on it, nothing works and as I said, no error or warning is coming back to work from, no message at all to work from. The only thing it triggers is those 2 console messages I mentioned above and the image does get to its new location. It's to the point now I'm just blank-mindedly staring at code. I'm not even getting back the else echo "You messed up somewhere" error from the final if statement, just the javascript alert that it was sent correctly, which it wasn't. I can really use some guidance on this one, thank you
  3. Hi, I've question regards to the topic title above for, "how to get/post myorder page code to payment page??" which didn't retrieve any data from myorder page or do I need a database for myorder page?. As myorder page uses GET function to collect information from product page that using mysqli SELECT function to get data from the database. Also "how to get/post the Total from the myorder page to payment page??". Below are the following code: - myorder.php page <?php session_start(); include 'db2.php'; if ( !empty($_SESSION["firstname"])) { } else { $_SESSION["firstname"]=null; } ?> <?php session_start(); if(isset($_POST["add_to_cart"])) { if(isset($_SESSION["shopping_cart"])) { $item_array_id = array_column($_SESSION["shopping_cart"], "item_id"); if(!in_array($_GET["id"], $item_array_id)) { $count = count($_SESSION["shopping_cart"]); $item_array = array( 'item_id' => $_GET["id"], 'item_name' => $_POST["hidden_vname"], 'item_price' => $_POST["hidden_vprice"], 'item_quantity' => $_POST["quantity"] ); $_SESSION["shopping_cart"][$count] = $item_array; } else { echo '<script>alert("Item Already Added")</script>'; echo '<script>window.location="myorder.php"</script>'; } } else { $item_array = array( 'item_id' => $_GET["id"], 'item_name' => $_POST["hidden_vname"], 'item_price' => $_POST["hidden_vprice"], 'item_quantity' => $_POST["quantity"] ); $_SESSION["shopping_cart"][0] = $item_array; } } if(isset($_GET["action"])) { if($_GET["action"] == "delete") { foreach($_SESSION["shopping_cart"] as $keys => $values) { if($values["item_id"] == $_GET["id"]) { unset($_SESSION["shopping_cart"][$keys]); echo '<script>alert("Item Removed")</script>'; echo '<script>window.location="myorder.php"</script>'; } } } } ?> <div class="panel"> <div class="panel-heading clearfix"> <h4 class="panel-title pull-left" style="padding-top: 7.5px;">Your Order Summary</h4> </div><!-- end panel-heading --> <div class="table-responsive"> <?php if (null==$_SESSION["firstname"]) { echo "You got to <a href='signin.php'>Sign In </a>to see Your Order summary"; exit(); } else { $sql = "Select * from register where firstname = "."'".$_SESSION["firstname"]."'"; $result = mysqli_query($con, $sql); $userinfo = mysqli_fetch_assoc($result); echo '<h5>'; echo $userinfo["firstname"]." ".$userinfo["lastname"]; echo '<br>'; echo $userinfo["address"]; echo '<br>'; echo $userinfo["country"]." ".$userinfo["zipcode"]; echo '</h5>'; } ?> <br /> <table class="table table-bordered"> <tr> <th width="40%">Item Name</th> <th width="10%">Quantity</th> <th width="20%">Price</th> <th width="15%">Total</th> <th width="5%">Action</th> </tr> <?php if(!empty($_SESSION["shopping_cart"])) { $total = 0; foreach($_SESSION["shopping_cart"] as $keys => $values) { ?> <tr> <td><?php echo $values["item_name"]; ?></td> <td><?php echo $values["item_quantity"]; ?></td> <td>$ <?php echo $values["item_price"]; ?></td> <td>$ <?php echo number_format($values["item_quantity"] * $values["item_price"], 2); ?></td> <td><a href="myorder.php?action=delete&id=<?php echo $values["item_id"]; ?>"><span class="text-danger">Remove</span></a></td> </tr> <?php $total = $total + ($values["item_quantity"] * $values["item_price"]); } ?> <tr> <td colspan="3" align="right">Total</td> <td align="right">$ <?php echo number_format($total, 2); ?></td> <td></td> </tr> <?php } ?> </table> </div> <form method="post"> <a href="index.php" class="btn btn-default">Continue Browsing</a> <a href="checkout.php" class="btn btn-default">Check Out</a></form> </div> - payment.php page <?php session_start(); if ( !empty($_SESSION["firstname"])) { } else { $_SESSION["firstname"]=null; } ?> <?php if (null==$_SESSION["firstname"]) { echo "You got to <a href='signin.php'>Sign In </a>to see Your Checkout summary"; exit(); } else { } ?> <?php // define variables and set to empty values $firstnameErr = $lastnameErr = $addressErr = $countryErr = $zipcodeErr = $emailErr = $creditcardnoErr = $expireMMErr = $expireYYErr = $creditcardexpiryErr = ""; $firstname = $lastname = $address = $country = $zipcode = $email = $creditcardno = $expireMM = $expireYY = $creditcardexpiry= ""; $haserror = false; global $con; if (null==$_SESSION["firstname"]) { echo "Sign in <a href='signin.php'>Sign in</a> first before making payment"; exit(); } else { } if ($_SERVER["REQUEST_METHOD"] == "Post") { if (empty($_POST["firstname"])) { $firstnameErr = "Firstname is required"; } else { $firstname = test_input($_POST["firstname"]); } if (empty($_POST["lastname"])) { $lastnameErr = "Lastname is required"; } else { $lastname = test_input($_POST["lastname"]); } if (empty($_POST["email"])) { $emailErr = "Email is required"; } else { $email = test_input($_POST["email"]); } if (empty($_POST["address"])) { $addressErr = "Address is required"; } else { $address = test_input($_POST["address"]); } if (empty($_POST["country"])) { $countryErr = "Country is required"; } else { $country = test_input($_POST["country"]); } if (empty($_POST["zipcode"])) { $zipcodeErr = "Zipcode is required"; } else { $zipcode = test_input($_POST["zipcode"]); } if (empty($_POST["creditcardno"])) { $creditcardnoErr = "Credit Card number is required"; $haserror = true; } else { $creditcardno = test_input($_POST["creditcardno"],$con); // Check if Creditcard only contains numbers if (!preg_match("/^[0-9]{15,16}$/",$creditcardno)) { $creditcardnoErr = "Only numbers allowed and minimum 15 digits"; $haserror = true; } } if (empty($_POST["expireMM"])) { $expireMMErr = "Expiry Month is required"; $haserror = true; } else { $expireMM = test_input($_POST["expireMM"],$con); } if (empty($_POST["expireYY"])) { $expireYYErr = "Expiry Year is required"; $haserror = true; } else { $expireYY = test_input($_POST["expireYY"],$con); } $creditcardexpiry = $expireMM.$expireYY; // Post to Database if no error if (!$haserror) { $sql = "INSERT INTO usercheckout (firstname, lastname, address, country, zipcode, email, creditcardno,creditcardexpiry,amount) VALUES (". "'".$firstname."'" . ", " . "'".$lastname."'" . ", " . "'".$address."'" . ", " . "'".$country."'" . ", " . "'".$zipcode."'" . ", " . "'".$email."'" . ", " . "'".$creditcardno."'" . ", " . "'".$creditcardexpiry."'" . ",". $_SESSION['total'].")"; if(mysqli_query($con, $sql)){ $sql0="SELECT MAX(paymentID) as paymentIDVal FROM usercheckout"; $result0 = mysqli_query($connection, $sql0); $pay = mysqli_fetch_assoc($result0); if (mysqli_query($connection, $sql0)){ $_SESSION['payid'] = $pay['paymentIDVal']; } $sql1 = "Select a.*, b.vname FROM shopping_cart a INNER JOIN video_products b ON a.vid=b.vid where checkout = 0"; $result1 = mysqli_query($con, $sql1); // Send out email for confirmed orders $subject = "Cherry Online Orders Confirmation"; $body = "<h2>Receipt Number: " . $_SESSION['payid'] . "</h2><br><br>"; $body .= "<table border='1'>"; $body .="<tr>"; $body .="<th>Product</th>"; $body .="<th>Unit Price</th>"; $body .="<th>Quantity</th>"; $body .="<th>Subtotal</th>"; $body .="</tr>"; while($row = mysqli_fetch_assoc($result1)){ $body .="<tr>"; $body .="<td>" . $row['vname'] . "</td>"; $body .="<td>" . $row['scprice'] . "</td>"; $body .="<td>" . $row['scquantity'] . "</td>"; $body .="<td>" . $row['scprice']*$row['scquantity'] . "</td>"; $body .="</tr>"; } $body .="</table>"; $headers = "From: StayONFLIX < stayonflix1234@gmail.com > \r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n"; mail($email,$subject,$body,$headers); // Set Checkout flag to 1 to signify item checked out $sql2 = "UPDATE shopping_cart SET Checkout = '1', paymentid =".$_SESSION['payid']." WHERE checkout = 0"; if(mysqli_query($con, $sql2)){ mysqli_close($con); header("Location: index.php"); } } // exit(); } } function test_input($data,$connection) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = mysqli_real_escape_string($connection, $data); return $data; } ?> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="panel panel-default"> <div class="panel-heading">Payment Address</div> <div class="panel-body"> <p><span class="error">* required field.</span></p> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> First Name: <input type="text" name="firstname" value="<?php echo $firstname;?>"> <span class="error">* <?php echo $firstnameErr;?></span> <br><br> Last Name: <input type="text" name="lastname" value="<?php echo $lastname;?>"> <span class="error">* <?php echo $lastnameErr;?></span> <br><br> E-mail: <input type="text" name="email" value="<?php echo $email;?>"> <span class="error">* <?php echo $emailErr;?></span> <br><br> Address: <input type="text" name="address" value="<?php echo $address;?>"> <span class="error">* <?php echo $addressErr;?></span> <br><br> Country: <input type="text" name="country" value="<?php echo $country;?>"> <span class="error">* <?php echo $countryErr;?></span> <br><br> Zipcode: <input type="text" name="zipcode" value="<?php echo $zipcode;?>"> <span class="error">* <?php echo $zipcodeErr;?></span> <br><br> Credit Card Number: <input type="text" name="creditcardno" value="<?php echo $creditcardno;?>" size="16" maxlength="16"> <span class="error">* <?php echo $creditcardnoErr;?></span> <br><br> Credit Card Expiry: <select name='expireMM'> <option value=''>Month</option> <option value='01'>January</option> <option value='02'>February</option> <option value='03'>March</option> <option value='04'>April</option> <option value='05'>May</option> <option value='06'>June</option> <option value='07'>July</option> <option value='08'>August</option> <option value='09'>September</option> <option value='10'>October</option> <option value='11'>November</option> <option value='12'>December</option> </select> <?php echo "<select name='expireYY'>"; echo "<option value=''>Year</option>"; for($i=0;$i<=10;$i++){ $expireYY=date('Y',strtotime("last day of +$i year")); echo "<option name='$expireYY'>$expireYY</option>"; } echo "</select>"; ?> <span class="error">* <?php echo $expireMMErr;?>&nbsp<?php echo $expireYYErr;?></span> <br><br> Amount: $<?php echo $_SESSION['total'];?> <br><br> <input type="submit" name="submit" value="Submit"> </form> </div> </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="panel panel-success"> <div class="panel-heading"> Review Order</div> <div class="panel-body"> <div class="row"> <div class="col-md-4 col-sm-4"> <span style="font-size:14px;"></span> </div> <div class="col-md-4 col-sm-4"> <span style="font-size:14px;">Item Name</span><br> <span style="color:rgba(99, 95, 95, 0.86);">Quantity: 1</span> </div> <div class="col-md-3 col-sm-3"> <span class="pull-right" style="font-weight:bold;font-size:20px;">$15.00</span> </div> </div> <hr> <div class="row"> <div class="col-md-6 col-sm-6"> <span style="font-weight:bold;font-size:20px;">Total Price</span> </div> <div class="col-md-5 col-sm-5"> <span class="pull-right" style="font-weight:bold;font-size:20px;">$15.00</span> </div> </div> </div> </div> </div> </div> Thanks for helping Appreciate alot, if someone could help.
  4. php 5.5.42 Database name: forums Table name: phpbb_users Row name: user_id What SQL query can I run in phpMyAdmin to update the user_id in every row, adding 8447002 to each user_id?
  5. Is it possible to save history of all my tables from my other site and copy all those history into my new one? I have milions of posts at my site, but since im moving to other one which is a free host, i want to have all those history. I can easily copy main structure but i have like millions of posts and i want to keep them all.
  6. Hi Firstly I am new to programming so go easy on me I am building a page where the user inputs text into a table called 'products'. This is the code I am using: $productname=$_POST['productname']; $productprice=$_POST['productprice']; $productpostage=$_POST['productposage']; $productquick=$_POST['productquick']; $productdescription=$_POST['productdescription']; $productdelivery=$_POST['productdelivery']; mysql_connect('localhost', 'username', 'password') or die(mysql_error()); mysql_select_db('Kanga') or die(mysql_error()); mysql_query("INSERT INTO 'product' VALUES ('$productname', '$productprice', '$productpostage', '$productquick', '$productdescription', '$productdelivery')"); print "$productname has been added to the database."; ?> When I press the submit button on the form, I get "Hello world(this is what i entered into the productname field) has been added to the database." I am using phpmyadmin, so should all the data that is submitted show up in there? Thanks Jarrod
  7. Hi all, I'v table called vehicles with id (int auto_increment) and plate_number (varchar 150). the plate_number have records like (a a a 1 1 1 1) (b b b 2 2 2 2), three chars and four numbers spliced by spaces. I'v php search page with url like this: http://localhost/vehicles/show.php?plate_number=f%20f%20f%205%205%205%205 search about plate_numbet = f f f 5 5 5 5 my php code: // pdo connection. // first sql test $sql = "SELECT * FROM vehicles WHERE plate_number LIKE '%".$_GET['plate_number']."%'"; // second sql test // $sql = "SELECT * FROM vehicles WHERE plate_number = '".$_GET['plate_number']."'"; $db->query($sql); if($db->rowcount() > 0){ // print all results... }else{ echo "There are no results."; } The query result is: There are no results.. But, when I copy the sql statements into phpmyadmin it is works fine. (there is a result). like this: SELECT * FROM vehicles WHERE plate_number LIKE '%f f f 5 5 5 5%'; OR SELECT * FROM vehicles WHERE plate_number = 'f f f 5 5 5 5'; Also i used string functions (htmlspecialchars, rawurldecode, ... ), still not work. any suggestion to solve this issue? Thanks to all
  8. I am creating a library app for personal development and would like to further my knowledge of MySql. I currently have two tables 'book' and 'category' book id title author category isbn ---- ------- ---------- ---------- ------- 1 Treasure Chest Jim Jones 1 14252637 2 Pirates Boat Sue Smith 2 88447737 3 Adventure Land Harry Jo 3 01918273 4 Winter Week Sam Dill 3 00999337 category id cat_name ---- ------- 1 Horror 2 Kids 3 Fiction 4 Science I am doing a simple search where I want to display all books (select * from book) and I would like to display all the books with their corresponding categories. This works but displays the category number instead of the category name. How can I alter these tables in such a way that the cat_name and category are joined? I tried to run a command in phpmyadmin as below however it returned an error; ALTER TABLE book ADD FOREIGN KEY (category) REFERENCES category(cat_name); error #1452 - Cannot add or update a child row: a foreign key constraint fails (`sslib`.`#sql-1ab4_1dae`, CONSTRAINT `#sql-1ab4_1dae_ibfk_1` FOREIGN KEY (`category`) REFERENCES `category` (`cat_name`)) I have been looking at foreign keys and indexes however I can't seem to make any sense of them. I am quite new to this so any help is much appreciated. Regards, J
  9. when i input this code it only uploads a single column into my database <html> <head> <title>MySQL file upload example</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <form action="try2.php" method="post" enctype="multipart/form-data"> <input type="file" name="uploaded_file"><br> <input type="submit" name="submit"value="Upload file"> </form> <p> <a href="list_files.php">See all files</a> </p> </body> <?php $con=mysqli_connect("localhost","root","","book"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } if(isset($_POST['submit'])) { $fname = $_FILES['uploaded_file']['name']; $chk_ext = explode(".",$fname); if(strtolower($chk_ext[1]) == "csv") { $filename = $_FILES['uploaded_file']['tmp_name']; $handle = fopen($filename, "r"); while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $sql = "INSERT into data(name,Groups,phone_number) values('$data[0]','$data[1]','$data[2]')"; $result=mysqli_query($con,$sql) or die(mysql_error()); } fclose($handle); echo "Successfully Imported"; } else { echo "Invalid File"; } } ?> </html>
  10. Hi Been trying to run a query to get all rows from a table between two dates, but nothing seems to work. $query = "SELECT * FROM table WHERE date BETWEEN '%2014-11-17%' AND '%2014-11-18%'"; Strange thing if I try a search instead a query in phpmyadmin I don't see an operator called 'BETWEEN' on the remote host, but I do on my localhost. Does this mean it will never work on the remote host? Nevertheless it doesn't work on either and I do have records for both dates in the table. phpmyadmin: Version 4.1.14 localhost (wamp) Version 3.3.7deb7 on remote server Thanks
  11. Hey there, First time using MySQL database to connect to a member login. I have a paid subscription site through ccbill which they add the username and logins to. I have setup a database, username and password as well as a table that I have connected correctly "I believe" to my website but get this message: warning: MySQL-fetch_array()expects parameter 1 to be resource, Boolean given in /home.... My table I have setup just has username and password to authenticate the users, which I was told by ccbill is all I need. Maybe I need authentication 1 or 0 etc. Any help on this would be amazing. Spent hours trying to figure this out but nothing. Thanks for your time. Steven
  12. I have 5 tables that I changed on my development server (laptop) that I'd like to upload to my test server. I can export just those tables from PhpMyAdmin but on import it drops all of the other tables first. Short of editing the SQL before I upload it (finding the drop and deleting it) is there an easy way to uncheck a box and change that behavior that I am just not seeing?
  13. I have used the XAMPP installer to install php and MySQL locall on my computer. I also succeeded in setting the security for XAMPP pages, the MySQL admin user root and phpMyAdmin login. When I enter phpMyAdmin via the link in the XAMPP initial page I do however receive a red notification: phpMyAdmin configuration storage is not fully configured; some extensions are not activated. To find out click here. I have attached a screenshot showing three items which are not OK, shown in red. I looked up in the documentation, but could not find out. I hope someone can help. I don't even know if it is important to fix this problem. Regards, Erik
  14. I have a table leitner_vcard_boxes. Each row represents a flashcard. I want to be able to efficiently sort the cards by the frequency with which the user got them correct. Each row has a column right_count and wrong_count and a percent_correct which I calculate in php as right_count/(right_count+wrong_count) I want to replace the manual calculation with a trigger since I believe that would be more efficient than reading the row, incrementing the right or wrong counter, calculating the new percentage correct and updating the row. The trigger I plan to use is: CREATE TRIGGER upd_right_percent AFTER UPDATE ON leitner_vcard_boxes FOR EACH ROW BEGIN UPDATE leitner_vcard_boxes SET right_percent=right_count/(right_count+wrong_count); END; My questions are: 1. Is the trigger going to give me the desired outcome? 2. If I export the leitner_vcard_boxes table from my development server's phpMyAdmin and replace (import) the table on the test server will the trigger move with it? Do I need to move the trigger separately? 3. How do I list the triggers in the database? Can I see them in phpMyAdmin someplace and I am just missing it? 4. What else should somebody who has not used triggers before consider?
  15. Hi there , im trying to submit textarea to the database , all is going good but there is problem in textarea row in database i think settings lacks , but i don't know what settings to use for that ,,, following is my php : <?php include("include/header.php"); if(isset($_POST['submit'])) { $name = $_FILES['file']['name']; $temp = $_FILES['file']['tmp_name']; move_uploaded_file($temp,"upload/".$name); $poster = "upload/$name"; $title =$_POST['title']; $director =$_POST['director']; $producer =$_POST['producer']; $writer =$_POST['writer']; $music =$_POST['music']; $genere =$_POST['genere']; $story =$_POST['story']; $cast =$_POST['cast']; $id = uniqid(); $date = date("Ymd"); $query = "SELECT * FROM movies WHERE title='$title' "; $result = mysqli_query($GLOBALS["___mysqli_ston"], $query) or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); if (mysqli_num_rows($result) ) { print 'Content Already Added'; } else { mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO movies (id,title,poster,story,director,producer,writer,cast,music,genere,date) VALUES ('$id','$title','$poster','$story','$director','$producer','$writer','$cast','$music','$genere','$date')"); } echo"Content Added"; } ?>
  16. I have created a web page where my customers will be able to enter details of all items there return back to my store. I have created in such a way that, 1 customer can enter his personal details once but can add any number of items he is returning. I have created a "add more" button to do this job. I have used arrays for this job, but when I am testing my site, database is not taking the items entered and is not displayed by phpMyAdmin. index.php.txt
  17. Not sure what's caused it, but on one of my tables, all of the related values all seem to be invisible? https://www.dropbox.com/s/vqtgw0az44isu1t/Screenshot%202014-03-31%2019.22.51.png When calling results it displays them properly and when running a search they all display, just not in the browse tab. Anyone got any ideas? Cheers
  18. srwright

    MYSQL help

    ok i have loaded a .sql file into PHPmyadmin. it is giving me this error :/ what can i do? im using this version: Server version: 5.6.16 - MySQL Community Server (GPL -------------------------------------------------------------------------------- SQL query: /*!40000 ALTER TABLE `group_members` ENABLE KEYS */; -- Dumping structure for table bc.help_subjects CREATE TABLE IF NOT EXISTS `help_subjects` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `caption` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; MySQL said: #1064 - 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 'CREATE TABLE IF NOT EXISTS `help_subjects` ( `id` int(11) unsigned NOT NULL A' at line 6
  19. I found this bug in phpMyAdmin: phpMyAdmin - Errorindex.php: Missing parameter: import_type<a href="./doc/html/faq.html#faqmissingparameters" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a> index.php: Missing parameter: format<a href="./doc/html/faq.html#faqmissingparameters" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a> What I did to find it: log in run an SQL statement let the session expire log back in hello ERROR!!!!!
  20. Hi, I'm currently trying to get my database for my website to work but at the moment I'm having a lot of issues with the new version? Basically I'm trying to create a simple registration table setup which includes: - user_id - firstname - lastname - username - email - password And the problem is that when I put them all in, set the Index's and the data types, it comes up with a message saying: "This is not a number"? I have no idea why it keeps coming up with this, any ideas? Here's what it looks like at the moment http://i.imgur.com/faOXjrs.png Thanks.
  21. I'm trying to use phpMyAdmin to put a blob video into the database (for ease of handling), and for some reason when I put the video into the blob, and submit it, phpMyAdmin bounces back to the home page, and says "no change". Does anyone know what's going wrong in the file? I've done the same upload with the image preloader just fine, but when I go to do the video it errors.
  22. Can someone please help me with this. I'm pulling my hair out. I have manually uploaded videos via FTP into a folder on my website and I am trying to get a code that I can use with a button that will tell my database to update it with all the current files... then display the files on the page. Can anyone help? I have the database all set up and what I need to do is get is the movie name, upload date, and the file size into the database FROM the folder I have all the movies in. That way I can repull that information from the database back into the website and display it all. Currently I am displaying all the files in the folder onto a webpage and it's starting to get laggy and time consuming to load. Not to mention I have plans on using some sort of pagenation to help with load times. Let me know if anyone still doesn't understand my endgame here. I'm not sure I am exactly explaining this the right way. Joe
  23. Hi! I wanna export data from my mysql database but when i do it, the php on the other site whith the same code shows a ? mark in a square like <?>. I tried everything but nothing works. Please help
  24. Hi! Trying to add foreign key to tables, but it doesn't work. The SQL question I used is : ALTER TABLE Klasse ADD FOREIGN KEY klassekode REFERENCES Student(klassekode) Get this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'REFERENCES Student(klassekode)' at line 3 Attachment: my sql file exportet from phpmyadmin
  25. Hello to all!! I really have a problem and i can t find any solution on the web. I'M trying to import in mysql database (using phpmyadmin on windows) a .BIN file. but it doesnt work. I receive this error : MySQL a répondu: Documentation #1064 - 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 ' A?S' at line 1 Any suggestion? thanks a lot
×
×
  • 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.