10,940 Topics
| |
Hi all, I am putting together a CRUD. I have read through tutorials, and references. Just wanted to see if i was on the right track: <?php // root -> /classLib/CRUD/CRUD spl_autoload_extensions(".php"); spl_autoload_register(); use classLib\database\database_Connection as DB; class CRUD { private $id; #__construct to be extended public function __construct($id=null){ $this->id … | |
Dear All, I'm facing problem with the symbols while getting the data from the table.. My output contains these ( � ) type of symbols i don't know why these coming even i declared <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Can any one having solution for this ? Thanks in advance.. | |
<?php session_start(); include("header.php"); include("conection.php"); include("modal.php"); if(isset($_SESSION["userid"])) { if(isset($_GET[first])) { } else { $_GET[first] =0; $_GET[last] = 10; } if(isset($_POST["button"])) { $resultac = mysql_query("SELECT * FROM examination"); echo mysql_num_rows($result); } else { $result = mysql_query("SELECT * FROM examination LIMIT $_GET[first] , $_GET[last]"); } $result1 = mysql_query("SELECT * FROM course LIMIT $_GET[first] … | |
Hi everyone, Ok so let me start by saying I am COMPLETELY new with MySQL, I have only tried to use it for the first time hours ago. This might be an easy one for you guys... Here's my code: <?php // Grab User submitted information $email = $_POST['users_email']; $pass … | |
Dear All gone through amny articles on uloading excel to mysql excellent code in http://phpexcel.codeplex.com/ http://sourceforge.net/projects/phpexcelreader/ MY issue is i cannot upload following (this is cut and pasted from an excel file) where in t1 is actually t and subscript 1 opposite to (n² i.e. n and superscript 2) I … | |
I was trying to loop through my database for some results and recieved this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hermes/waloraweb032/b867/moo.classiadsinfo/ajax/searchApp.php on line 8 and heres my code: <?php require_once '../connect.php'; if(isset($_POST['search_term'])==true && empty($_POST['search_term'])==false) { $search_term=mysql_real_escape_string($_POST['search_term']); $query=mysql_query("SELECT `Category`, `Type` FROM `autosuggest` WHERE `Category=.'$_POST[category]'` … | |
I've installed mysql 5.5 to work with php.From the workbench I tried to connect first time, impossible.I've allowed the program through the firewall,nothing.I read all the tutorials on the subject, still I don't understand one thing. How do I set admin privileges if I cannot connect? If I run the … | |
Hi, new to the forum. Im building a site where articles can be created by staff. So is it better to save articles as html files on the server with PHP's file access methods or simply store the whole source code with all the tags in a database (MySQL). It … | |
Hello, Does anyone know how to write recursive SQL statement for hierarhic output places from next table: TABLE PLACES: id-----place----------idParentPlace 1......World..........Null 2......Europe.........1 3......Mediterranean..2 4......North Europe...2 5......Italy..........3 6......Greece.........3 7......Island.........4 8......Norway.........4 I don't know if this is totally correct SQL recursive statement: WITH recursion AS (SELECT id, place, idParentPlace, 1 AS hierarhic … | |
Here is my code, and i would like to read images from my mysql database and display it over a JButton using the BufferedImage casting into Image. Everytime i want it to display, it would fail to read the data and run to the Exception, may i please have help … | |
Hi all, I'm trying to use recordset to create the following query: $query_GetCurMonthPlayerGoals = "SELECT PlayerName, Goals FROM ( SELECT PlayerID, COUNT(*) AS Goals FROM Master WHERE TeamID=$row_GetTeamDetails['TeamID'] AND MONTH(GoalDate)=MONTH(CURDATE()) GROUP BY PlayerID ORDER BY Goals DESC ) T INNER JOIN Master_Players ON T.PlayerID=Master_Players.PlayerNameCode"; The problem I am having is … | |
Though am still a learner, I have developed a small php application and planning to sell the same. Meantime, I would like to protect my script using api or something and srictly not obfuscating or encoding, or using zend frame work? Is there any easy way? using base64decode, I should … | |
Hi, I have been using MySQL to analyze quiz results. I have created a series of queries which yield particular graphs which help me in my analysis. For some reason, unknown to me, when I turn these queries into a 'Routine' the option to 'display chart' is taken away in … | |
Hi guys, Need an effective suggestions on how to deal with this situation. Im working with php and mysql. Now the system i am creating needs to send emaill notification once a year. | |
The following optimized select query select ***consecutive*** rows, i.e it chooses the first random row and the following ones will just be the ones below it: SELECT name,r1.id FROM entries AS r1 JOIN (SELECT (RAND() * (SELECT MAX(id) FROM people)) AS id ) AS r2 WHERE r1.id >= r2.id ORDER … | |
I've been having trouble with an UPDATE statement in the code below. The problem is that each time I submit the form to update an existing record in the products table, the records won't update. When I submit the form there is no error message and it redirects to the … | |
Hi, I have a mysql database with some student info records. I am trying to Update a record in the db using a html form and a php script however it wont update. It doesnt give me any errors. Can anyone assit me please. Here is the code. **editingRecord.php** <?php … | |
Hi everyone, i would like some help with a couple of mysql queries. I have a table of data which looks like this : ![grid1](/attachments/large/2/grid1.PNG "grid1") And represents a transaction log for players of a game. The ID is the primary key (auto incremented). DATETIME is the date and time … | |
i have 3 tables. leave_cri:typs of leave allowd 4 an emp leave_eli:all typ of leaves leave_detail:details of leave taken by an emp i need 2 write a query 2 select data based on these 3 tables. ie) i have 2 display these in a grid. leave details from_leave_details ; leave … | |
Hi. My web hosting provide will charge me extra money if I want to do backup to my mysql database. My size of my db is very small but I've alot of tables though. What's the best way to backup my database schema and data in a way so I … | |
i connected and migrated all the things from access to mySQL (online) using free hosting on the net, when i make my simple program to .exe, then run it on different computer, its asking for some OCX and dll files... why is that happening? my .exe program run well on … | |
| Hi, I'm getting this error: **Column 'id' cannot be null**. I can't figure it out why. I always **Import** the tables by using **.sql** into **MyPHPAdmin**. I only have **2** tables. One is **mypost** and the other **username**. For my **.sql** file I always have the same format with **NOT … |
Hi, I have these methods in my user class which check whether a username already exists and if not, inserts it into the database: //This function checks to see if the username entered already exists Private function check_user_exists() { $stmt = $this->_db->prepare('SELECT * FROM client_login WHERE Username = ?'); $stmt->execute(array($this->_username)); … | |
| I'm attempting to make a web-based scheduling system, but I'm having trouble figuring out how to make it work in the best manner. First, the current table structure: **shifts** Shift_ID (pk) Event_ID (fk) Dept_ID (fk) Start End **shifts_assigned** Entry_ID (pk) Shift_ID (fk) User_ID (fk) DateAssigned Position Notes Where pk is … |
Dear Members/Guests, I have a manually created website(not by me, but by some professionals). I am desperate because of the weak SEO performance this website has. I have tried everything to increase it, but with no success. The website itself has almost 1000 festivals uploaded with pictures, events, places, content. … | |
Hi,I can't display Multiple checkbox save value in my veiw page. Here is insert/save value details: Model --------- public function saveInstituteOfferdCourse($data = array()) { if ($this->db->insert('tbl_course_offred', $data)) { return $this->db->insert_id(); // tbl_course_offred = "Table name" } return FALSE; } ---------- Controller ---------- public function saveCourses() { $data = array(); $this->load->library('form_validation'); … | |
Hello, I was wondering if there anyway to Select rows where the date column falls into a certain range? For example, heres a table [code] The date field is generated automatically by MySQL with the DATE function Heres the table: [user] . [wins]. [date] bobby.......4..... 2006-08-21 boby1.......3..... 2006-08-22 boby2.......6..... 2006-08-24 … | |
I have been searching all morning and I cant seem to find a reliable source for a decent slideshow script, I am working on creating one myself now, if anyone has any helpfull hints or tips, or even if you have some code snipets that would be usefull for my … | |
Hello, Let's say I have 2 tables: * projects * users and I need to relate them so that a user can work on one or more projects and a project can be worked by one or more users. How to implement this without having a third table ?? It … | |
Hi all, This is a follow on from my last post. Here is my current query: SELECT * FROM ( SELECT * FROM ( SELECT TeamID, PlayerID, COUNT(*) AS Total FROM Scored WHERE MONTH(GoalDate)=12 AND YEAR(GoalDate)=2012 GROUP BY PlayerID ) T GROUP BY TeamID, Total DESC ) T GROUP BY … |
The End.