10,940 Topics
| |
Hey, I'm running a mysqli query, and would like to run a script if the query returns no results. this is my code <?php $SM_pro_info="SELECT * FROM special_marketing_ads ORDER BY id desc LIMIT 4"; $QSM_pro_info = $db->query($SM_pro_info)or die($db->error); $SM_pro=mysqli_fetch_array($QSM_pro_info); if($SM_pro){ while($SM_pro=$QSM_pro_info->fetch_object()){ ?> <table width="208" border="0"> <tr> <td width="129" height="35" align="right"><span … | |
Hi What would be the best practice to format my text in MySQL without messing around in php? For example, I have a description: TECHNICAL FEATURES: Anti static, dust repellent,... COLOURS AVAILABLE: - WHITE - BLACK I'm copying everything from my old website (html-only) into my database, and this is … | |
Below is a documented code example showing how to use the [MySQLi](http://php.net/manual/en/book.mysqli.php) (MySQL improved) classes/objects to connect and query your database (and check for errors). If there are any questions, or you want to see different features, let me know. | |
Below is a documented code example showing how to use the [MySQL functions](http://php.net/manual/en/book.mysql.php) to connect and query your database (and check for errors). Please note that using the MySQL extension is **NOT RECOMMENDED**. This extension is no longer maintained and will be deprecated soon. If you want your scripts to … | |
i have a table in Mysql's database, tblStudents, which has 1,000 stdents, from different departments, e.g 500 from IIT, 300 from IMS, 100 from Medical, 100 from Engineering. and on fornt end in, i have 2 dropdown boxes, one drpdwnDown box is filled with values, IMS, IIT, MEDICAL, ENGINEERING. now … | |
i have 2 tables as follow sales (table1) sales_id, userid(buyerid), product id, productname, orderid, status users (table2) userid, username, pass Now, I need to display the top customer who makes regular purchase on my shopping site. How can I achieve this? I tried as SELECT A.(*), B.username FROM sales A, … | |
Good day, I've created a webpage on localhost using php. I have a local network with 3 computers at home. I can access the webpage only from one computer (http://localhost/mywebpage/). What changes should I make in phpmyadmin to be able to access the webpage from all computers? Is it possible? … | |
DaniWeb will once again be sponsoring the Percona Live MySQL conference coming up next month. You can go to http://www.percona.com/live/nyc-2012/ to register and use promo code DANIWEB to save 15% on tickets. DaniWeb will also be hosting the official after party for the Percona conference, which you can find out … | |
Hi Everyone! My question is on Pagination (as it is called). I have a php program that accesses a database and shows the result list with HTML. Well, if my result list is quite long how do i code so that only say 10 rows show per page. I know … | |
i am making a booking system and i am thinking how am i suppose to know if there is a conflicting time.. i want to add an Error message if the time is conflicting in other event help me please Example: Date Time Start Time End DEBUT September 18 5:00 … | |
Hi All, I want to generate time table reports. A form includes labels to enter grade, class and stream. After selecting data user should click on "Generate" button and relevant time table details. The data is submitted for the following page and there was an empty set of data shown … | |
I am creating the Simple Blog from PHP for absolute beginners book. I have worked through the book and my only error now occurs when I am logged in as the admin and try to Post a Blog. The errors I get are: Warning: array_push() expects parameter 1 to be … | |
Hi guys, i'm new here. First of all, i'm from Argentina... So maybe my english is a little crappy I'm developing a page with login. I uploaded it to a hosting with no poblem... But when i want to create a stored procedure an error appearse. I've searched on web … | |
I just want to connect my mysql with vb.net code as below: But,for some reason I cant figure out the problem i have also added the mysqldata.dll in my reference. all the input in connection string is valid and there is no error in the code. it just shows cannot … | |
Dear Respected Members, I have problem with LEFT JOIN that it brings the whole columns from tables even if I limit to specific column ids :( I am forced to use the LEFT JOIN because in table B - column "id" - is not always exists in table A. Please … | |
Hey, I've got a simple little table that has only 3 fields. ID (primary key, auto-increment), cat_name, and cat_num. I need to know how to get my php script to go into that table, and increase the value in cat_num by one on every row. So for instance, here is … | |
Hi. does anyone know how to save the combobox selected Index like(0,1,2,3) in mysql database by combobox as INTEGER? Please help me..! | |
i created database in mysql along with 3 tables but when i opened C:\ProgramData\MySQL\MySQL Server 5.5\data then i found on .frm files and a single .opt file so where is my originalo datbase and data ? my datbase name is kustkht | |
Hi, I have this script, it attempts to place JSON data into a MySQL database. The problem is it duplicates records, this does not happen when the “news_added” field is not NULL. That’s the only thing I can see different. I would like the script to update a record, replacing … | |
hi all. I have some problem. I want to make Delete multiple rows in mysql with check box. so I did it below. but delete doesn't work. could you tell me where is wrong ? <?php include'conn.php'; mysql_select_db("auction")or die("cannot select DB"); $sql="SELECT * FROM family"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <table width="400" … | |
Hey guys I have a mysql database that has an events table. The events table consists of the fields Title, Date, Place and description. I am trying to display the table on the browser using php coding. it should list important events first according to the date. so as follows … | |
i have tblStudents and tblDepartments, so which keys a weak entity (student_department) would have ? studentid and departmentid ? is it so ? and both foreign keys will work as a composite primary keys ? is it ? | |
is it possible to run mysql and ms sql at one pc ? mean local host ? | |
hi to all, can you help me in my program, i can't retrieve my image in the database to vb.net how can i view my image when i click in listview? plss help me THIS IS MY CODE HOPE YOU CAN HELP ME! Imports MySql.Data.MySqlClient Public Class Often_Motorcycle_Problems Public ConnString … | |
Please help me for my problem in adding and retrieving video from mysql to vb 2008. I don't know the codes for it. | |
I have no issues with the query in the below code. But the second code is throwing the error 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 '' at line 1 Working code … | |
Hi guys, I´m attempting to write a simple "get quote" script, but need some advice about best practice. I want to structure it as follows, lets say a customer wants 1,2,3,4 or 5 apples - I want the quote to be $1. If the customer wants 6,7,8,9 or 10 apples … | |
Hi I have the following code being used to insert some data into a MySql database, all the error checks etc. are done before and those are fine, and the code returns connected successfully but nothing is put into the database, nor does the database check for duplicate usernames, because … | |
I have created two database tables, One which holds all of the users information, and another which holds the name of the videos they uploaded and who uploaded it. How do I get information from both tables? | |
I have no issues with the query in the below code. But the second code is throwing the error 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 '' at line 1 Working code … |
The End.