7,368 Topics
|
|
How to get last auto number? I've got 2 tables I.e. booking and booking membership One person is the leader of a booking, but many people can be members of that Still, when I inse the booking I want to also do an insert into the bookingmembership table. The booking … |
|
Hi guys! I have company website created using PHP and mysql database. I am not a programmer but know few things about ftp transfer etc. We happen to change our web server and for that had to transfer the file to new location. All the files are intact and even … |
|
When People are trying to insert an sql inection, that time mysql errors displays the table name with the column names, how can I turn off this, My site is built in MVC framework, and this is how developers have queried the database, [CODE] $offset=0; if(isset( $_GET['offset'])) $offset=$_GET['offset']; $array_list=$DB->q("select *,users.user_list_id … |
|
Good Afternoon, I have a bit of a dilema, maybe 2 or 3... I have a members table in MySql, that includes a field called join_date which is designated as DATE type field I have 7 position tables named position_1 thru position_7 These each have a field called create_date which … |
|
Dear all, Am half way through my computer lab management project. to generate the timetable automatically i've written an algorithm. and for it to work i need an sql query that can : table-> ttprofile: id lab_name subject_name. now i looked every where, is there a command to take the … |
|
the below table is order by rank .. however i want order by in a way that 'Cpl' comes first. 'lcpl' comes second and 'pte' come last.. if i use ascending or descending it will order by a random manner. |
|
I am a nood forgive me if all my code is messy, and evrything I know is self taught so my knowledge is not that great. I have an issue, I created an insert record form and in it there is title, price, 8 file upload fields and other fields. … |
|
Say i have a series of items , so items have multiple people associated with them Item_id type_id person_id 1 1 1,2 2 1 3,4 3 2 1,3 Will this work when i search for them in php say display people with item one person 1 and person 2 |
|
Primarily, I need a table of employees with the following fields: Name, Photo(s), and Bio. So the rest should be easy enough, but I know nothing about databases.... so the photo field I'm assuming should be of the blob type, however I need to have a primary photo, and then … |
|
Hello, I am currently building a site for friends that would like to have 1 site but have 4 separate blogs on it. I have created a basic php admin section which allows 1 user to go in and add posts, manage posts and delete posts. What i would like … |
|
Dear users, I am new to PHP5. My LAMP is working just fine.I made small database connect scripts and they just worked as it should.Then I tried the following code and run the mysql.php but showing me following error: [CODE]Could not run query: Access denied for user 'www-data'@'localhost' (using password: … |
|
Dear Experts, Thanks for your time. I have to creat a dynamic table through asp.net in database. On page there is a table Row with text and column with text. There is button Edit above the table: User press + to add a row or colum Column and row is … |
|
I have a MySQL table table with two fields: id and name. id is primary key with auto_increment. The thing is when I insert a record and then empty the table, and insert a record again, the id value does not start from 1, it keeps increasing even though the … |
|
Hi,guys,i cant solve this insert query into ,this is my query,i want it to insert it to another new table.How to solve this query?thank Q very for the help...cheers [CODE] SELECT adp.adsPageId,adp.adsSpaceId, DATE_FORMAT(adp.dayClick, '%Y-%m-%d') AS dateReport, (SELECT COUNT(*) FROM ads_display att WHERE att.adsSpaceId = adp.adsSpaceId AND att.adsPageId = adp.adsPageId AND … |
|
can anybody tell me what is wrong with my sql statement because it runs well if their is only one or but when I put another or it gives nothing to display [CODE]"SELECT * FROM tbldoctor_info i, tblmonday m, tbltuesday t, tblwednesday w, tblthursday h, tblfriday f, tblsaturday a, tblsunday … |
|
Hi, I have created a database, where it is possible to create posts and see them on a different page. On the page where it's possible to see all the records I want to create a delete link so it is possible to delete the record where you have pressed … |
|
Hi friends! i have a drop down combo box which holds names of persons with php mysql order by asc query like a's name put in 1st and after b's and c's and in last it shows z's name now i want that if it will show tahir name in … |
|
$dbQuery="select id, name from artists where name like '$keyword%' order by name asc limit 15"; $dbResult=mysql_query($dbQuery); echo mysql_num_rows($dbResult)."\n"; while ($dbRow=mysql_fetch_array($dbResult)) { // for each artist, return the number of albums belonging to that artist // use a separate query here to obtain the number // return the number after the … |
|
I have a project in which i have two roles : Student Teacher I have already created a login page but i cant figure out how to redirect them to different pages according to their Roles... |
|
Hey got a big issue i need to resolve if i have a table that records two distinct values entered by user.. NC001 OR TE001 Equipment_id | Serial | location -------------------------------- NC001 | if i have a php based form how can i tell it that if a user select … |
|
Hello, Pls i developed a php application and i would like to limit the number of row entries into a table in my database and the number of rows displayed from that table. i am a beginner:$ |
|
Hello !! I need help fot the following situation: I have 2 tables: test1 and test2: each one have the same columns name: data test1: column data values (black, white) test2: column data values(white,black,orange, yellow) what sql sentence i can use to show only the values (orange, yellow) the difference … |
|
After INSERTing record(s) to payments_table (from paypal IPN), $query = "SELECT sum(payments) FROM payments_table WHERE customer_id='{$customer_ID}'"; $result = mysql_query($query); //get the value from result here $query = "SELECT customer_id FROM discounts_table WHERE customer_id='{$customer_ID}'"; $result = mysql_query($query); //if row > 1 //loop until reached a certain condition THEN genarate a NEW … |
|
Hi! I have a table for payments what I want to accomplish is: once a certain customer Id reached a certain amount by his accumulated payment, it will trigger an insert into statement to my discount table to generate a code specifically for him. i understand thats trigger is only … |
|
Hi all I have following table structure [CODE] pk_cat_id(int) cat_name(varchar) cat_desc(text) fk_cat_id(int) [/CODE] table is self related as one to many i want to select cat_name, cat_desc and parent_cat_name() i.e. from fk_cat_id, how i can get cat_name |
|
Hi I am trying to cross join 3 tables and use the values from this to calculate cumulative Accuracy for each student. But I am missing some students name when they dont have values in one of the tables. Eg: [CODE]mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); // to … |
|
Hi We have a competition running that I would like to automate getting the results with PHP from my MYSQL DB. I can run a query on the Database to get the following results Consultant1 20 sales Consultant2 10 sales Consultant3 5 sales Consultant4 1 sales Consultant5 3 sales Consultant6 … |
|
Dear All, I have a system with the web server(apache) and db(mysql) server install on separate machines. So at times when the traffic is high I can not access my system. So first I would like to know where is the error and where is the error log file will … |
|
can anybody help me how I can use four tables at the same time with different conditions to fetch records from my database? this is my sql code that im trying to modify because this is only for two tables: [CODE] <?php session_start(); if (isset($_SESSION['username'])) { include("database.php"); $username = $_SESSION['username']; … |
The End.