Hi guys,
So I don't know if this is asking too much, but I want to do an SQL query with my photo gallery (I use Simgallery) so the Profiles can show users albums, pictures, and videos.
The actual number is not in the database, I need a counter. The tables look like this:
Code:
<table name="upa1d_simgallery_media">
<column name="mid">2</column>
<column name="owner">993</column>
<column name="type">photo</column>
<column name="typeid">1</column>
</table>
<table name="upa1d_simgallery_media">
<column name="mid">3</column>
<column name="owner">993</column>
<column name="type">photo</column>
<column name="typeid">2</column>
</table>
<table name="upa1d_simgallery_media">
<column name="mid">4</column>
<column name="owner">993</column>
<column name="type">photo</column>
<column name="typeid">3</column>
</table>
<table name="upa1d_simgallery_media">
<column name="mid">5</column>
<column name="owner">993</column>
<column name="type">photo</column>
<column name="typeid">4</column>
</table>
<table name="upa1d_simgallery_media">
<column name="mid">6</column>
<column name="owner">993</column>
<column name="type">photo</column>
<column name="typeid">5</column>
</table>
So basically I need some sort of SQL query that:
1. Accesses the database
2. Looks only for the info of whoever's profile we're on
3. Searches that specific "owner" for the type=photo
4. Counts them, and displays that number.
That make sense? My SQL is horrible so, any possible help here would be super appreciated.