473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Add in * into PHP statement for MySQL search

1
When I try to add in a * into a $... Statement it throws errors. This is going to be a search function for mysql.

<?php $page = *; >? So, basically there is a PHP form which will search my SQL with the values entered. I got it working so that it searches from the https://100001.onl/ values entered but I just can't have it search all fields if there is nothing entered into the database. I have if else statements written the check if it's empty and applies a value to search for all items, and that is where I have the $page statement. I just need it so that it will add in an asterisk without throwing errors.
Apr 13 '20 #1
0 2429

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Zaphod Beeblebrox | last post by:
As much of this question relates to mysql, it may be OT? I'm trying to make a search engine for a reasonably complex database that was originally developed by someone else in Access. I've ported...
1
by: WindAndWaves | last post by:
Hi Gurus Is there a way to search for a word in any of the fields of a row using simple sql for my sql? I have a rather complex search function on my site and right now, I dump all the text of...
1
by: SC | last post by:
I'm developing a site that may eventually have a very large database of users (hopefully, but who knows). It will be a community website where users can search each other (think Friendster,...
0
by: odysseyphotography | last post by:
Hi, I'm trying to build a simple search for a database of jobs. Users can search using three groups of critera: 1) Area (check boxes) Buying and merchandising Design Executive
2
by: rudyseema | last post by:
Hi, I need to get a search result from two tables, the details will be filled in and i need the sql statement which will take the filled in data and get the result. i wrote one statement but its...
1
by: lawrence k | last post by:
I need to put together a simple search function. I imagine there is already some PHP code out there that handles the basics? For instance, how do I search for just words, from one word boundry to...
8
by: Bosnoval | last post by:
(Windows 2000 Server SP4 running ASP web pages with a Microsoft Access database) Hi, I’m a newb just trying to get some help with an Access database SQL statement… I’ve been trying to add a...
2
by: fusonts | last post by:
Can someon show me how to wirte a mySQL search query to search from only the open records. This is what I have but it continues to return records that are closed so I'm obviously doing something...
2
by: daveeboi | last post by:
I have been trying to fix this code for days now but all I get from searching my database table for records that should come up is the no records comment. Could anyone tellme if my MySQL statement...
1
by: Akino877 | last post by:
Hello, I have a small Perl program : #!/usr/bin/perl -w use DBI; use Mysql; $host = ""; $database = ""; $user = "root";
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.